public void TestZen2Han() { string instr = @"123ABC123ABCあいうアイウがぎぐガギグぱぴぷパピプう゛ヴ¥¥\"; string expstr = @"123ABC123ABCアイウアイウガギグガギグパピプパピプヴヴ\\\"; string result = JStrUtils.Zen2Han(instr); Assert.AreEqual(expstr, result); }
public void TestKata2Hira() { string instr = @"アイウエオガギグゲゴパピプペポヴウ゛ヱ"; string expstr = @"あいうえおがぎぐげごぱぴぷぺぽう゛う゛ゑ"; string result = JStrUtils.Kata2Hira(instr); Assert.AreEqual(expstr, result); }
public void TestHan2Zen() { string instr = @"123ABCアイウガギグパピプヴ\\"; string expstr = @"123ABCアイウガギグパピプヴ¥¥"; string result = JStrUtils.Han2Zen(instr); Assert.AreEqual(expstr, result); }
public void TestReduceString3() { Encoding encoding = Encoding.GetEncoding(@"csWindows31J"); string instr = @"12345"; string expstr = @"12345"; string result = JStrUtils.ReduceString(instr, 20, encoding); Assert.AreEqual(expstr, result); }