Ejemplo n.º 1
0
 public void Wagahai_Katakana_HankakuZenkaku_Test()
 {
     Bench(ExampleText.WAGAHAI, 10, new[]
     {
         new Pair <string, Func <string, string> >("StrConv", targetText =>
         {
             var s = Strings.StrConv(targetText, VbStrConv.Katakana, 0x411);
             s     = Strings.StrConv(s, VbStrConv.Narrow, 0x411);
             return(Strings.StrConv(s, VbStrConv.Wide, 0x411));
         }),
         new Pair <string, Func <string, string> >("kanaxs", targetText =>
         {
             var s = Kana.ToKatakana(targetText);
             s     = Kana.ToHankakuKana(s);
             return(Kana.ToZenkakuKana(s));
         }),
         new Pair <string, Func <string, string> >("Kanaria", targetText =>
         {
             return(UcsString.From(targetText)
                    .Katakana()
                    .Narrow()
                    .Wide()
                    .ToString());
         }),
     });
 }
Ejemplo n.º 2
0
 public void Wagahai_Katakana_Test()
 {
     Bench(ExampleText.WAGAHAI, 10, new[]
     {
         new Pair <string, Func <string, string> >("StrConv", targetText =>
         {
             return(Strings.StrConv(targetText, VbStrConv.Katakana, 0x411));
         }),
         new Pair <string, Func <string, string> >("kanaxs", targetText =>
         {
             return(Kana.ToKatakana(targetText));
         }),
         new Pair <string, Func <string, string> >("Kanaria", targetText =>
         {
             return(UcsString.From(targetText).Katakana().ToString());
         }),
     });
 }