// // This software is now distributed according to // the Lesser Gnu Public License. Please see // http://www.gnu.org/copyleft/lesser.txt for // the details. // -- Happy Computing! // package com.stevesoft.pat; /** Encapsulates the Unicode definitions of Upper, Lower, and Title case as defined by unicode.org.
The performance of the methods found in String
and Character is better, but these methods work
both in java 1.0 and 1.1. If it is desirable,
either to gain a slight performance increase or
to accomodate application specific modifications
to the definitions of upper, lower, and title case
then it should be a straightforward task to substitute
your own methods for these.
*/
final public class CaseMgr {
final static boolean java_1_0 = false;
/** Convert a character to upper case .*/
public static char toUpperCase(char c) {
if(java_1_0) {
int ret = (int)c;
switch(c) {
case 97: ret=65; break;
case 98: ret=66; break;
case 99: ret=67; break;
case 100: ret=68; break;
case 101: ret=69; break;
case 102: ret=70; break;
case 103: ret=71; break;
case 104: ret=72; break;
case 105: ret=73; break;
case 106: ret=74; break;
case 107: ret=75; break;
case 108: ret=76; break;
case 109: ret=77; break;
case 110: ret=78; break;
case 111: ret=79; break;
case 112: ret=80; break;
case 113: ret=81; break;
case 114: ret=82; break;
case 115: ret=83; break;
case 116: ret=84; break;
case 117: ret=85; break;
case 118: ret=86; break;
case 119: ret=87; break;
case 120: ret=88; break;
case 121: ret=89; break;
case 122: ret=90; break;
case 224: ret=192; break;
case 225: ret=193; break;
case 226: ret=194; break;
case 227: ret=195; break;
case 228: ret=196; break;
case 229: ret=197; break;
case 230: ret=198; break;
case 231: ret=199; break;
case 232: ret=200; break;
case 233: ret=201; break;
case 234: ret=202; break;
case 235: ret=203; break;
case 236: ret=204; break;
case 237: ret=205; break;
case 238: ret=206; break;
case 239: ret=207; break;
case 240: ret=208; break;
case 241: ret=209; break;
case 242: ret=210; break;
case 243: ret=211; break;
case 244: ret=212; break;
case 245: ret=213; break;
case 246: ret=214; break;
case 248: ret=216; break;
case 249: ret=217; break;
case 250: ret=218; break;
case 251: ret=219; break;
case 252: ret=220; break;
case 253: ret=221; break;
case 254: ret=222; break;
case 255: ret=376; break;
case 257: ret=256; break;
case 259: ret=258; break;
case 261: ret=260; break;
case 263: ret=262; break;
case 265: ret=264; break;
case 267: ret=266; break;
case 269: ret=268; break;
case 271: ret=270; break;
case 273: ret=272; break;
case 275: ret=274; break;
case 277: ret=276; break;
case 279: ret=278; break;
case 281: ret=280; break;
case 283: ret=282; break;
case 285: ret=284; break;
case 287: ret=286; break;
case 289: ret=288; break;
case 291: ret=290; break;
case 293: ret=292; break;
case 295: ret=294; break;
case 297: ret=296; break;
case 299: ret=298; break;
case 301: ret=300; break;
case 303: ret=302; break;
case 305: ret=73; break;
case 307: ret=306; break;
case 309: ret=308; break;
case 311: ret=310; break;
case 314: ret=313; break;
case 316: ret=315; break;
case 318: ret=317; break;
case 320: ret=319; break;
case 322: ret=321; break;
case 324: ret=323; break;
case 326: ret=325; break;
case 328: ret=327; break;
case 331: ret=330; break;
case 333: ret=332; break;
case 335: ret=334; break;
case 337: ret=336; break;
case 339: ret=338; break;
case 341: ret=340; break;
case 343: ret=342; break;
case 345: ret=344; break;
case 347: ret=346; break;
case 349: ret=348; break;
case 351: ret=350; break;
case 353: ret=352; break;
case 355: ret=354; break;
case 357: ret=356; break;
case 359: ret=358; break;
case 361: ret=360; break;
case 363: ret=362; break;
case 365: ret=364; break;
case 367: ret=366; break;
case 369: ret=368; break;
case 371: ret=370; break;
case 373: ret=372; break;
case 375: ret=374; break;
case 378: ret=377; break;
case 380: ret=379; break;
case 382: ret=381; break;
case 383: ret=83; break;
case 387: ret=386; break;
case 389: ret=388; break;
case 392: ret=391; break;
case 396: ret=395; break;
case 402: ret=401; break;
case 409: ret=408; break;
case 417: ret=416; break;
case 419: ret=418; break;
case 421: ret=420; break;
case 424: ret=423; break;
case 429: ret=428; break;
case 432: ret=431; break;
case 436: ret=435; break;
case 438: ret=437; break;
case 441: ret=440; break;
case 445: ret=444; break;
case 453: ret=452; break;
case 454: ret=452; break;
case 456: ret=455; break;
case 457: ret=455; break;
case 459: ret=458; break;
case 460: ret=458; break;
case 462: ret=461; break;
case 464: ret=463; break;
case 466: ret=465; break;
case 468: ret=467; break;
case 470: ret=469; break;
case 472: ret=471; break;
case 474: ret=473; break;
case 476: ret=475; break;
case 479: ret=478; break;
case 481: ret=480; break;
case 483: ret=482; break;
case 485: ret=484; break;
case 487: ret=486; break;
case 489: ret=488; break;
case 491: ret=490; break;
case 493: ret=492; break;
case 495: ret=494; break;
case 498: ret=497; break;
case 499: ret=497; break;
case 501: ret=500; break;
case 507: ret=506; break;
case 509: ret=508; break;
case 511: ret=510; break;
case 513: ret=512; break;
case 515: ret=514; break;
case 517: ret=516; break;
case 519: ret=518; break;
case 521: ret=520; break;
case 523: ret=522; break;
case 525: ret=524; break;
case 527: ret=526; break;
case 529: ret=528; break;
case 531: ret=530; break;
case 533: ret=532; break;
case 535: ret=534; break;
case 595: ret=385; break;
case 596: ret=390; break;
case 598: ret=393; break;
case 599: ret=394; break;
case 600: ret=398; break;
case 601: ret=399; break;
case 603: ret=400; break;
case 608: ret=403; break;
case 611: ret=404; break;
case 616: ret=407; break;
case 617: ret=406; break;
case 623: ret=412; break;
case 626: ret=413; break;
case 643: ret=425; break;
case 648: ret=430; break;
case 650: ret=433; break;
case 651: ret=434; break;
case 658: ret=439; break;
case 940: ret=902; break;
case 941: ret=904; break;
case 942: ret=905; break;
case 943: ret=906; break;
case 945: ret=913; break;
case 946: ret=914; break;
case 947: ret=915; break;
case 948: ret=916; break;
case 949: ret=917; break;
case 950: ret=918; break;
case 951: ret=919; break;
case 952: ret=920; break;
case 953: ret=921; break;
case 954: ret=922; break;
case 955: ret=923; break;
case 956: ret=924; break;
case 957: ret=925; break;
case 958: ret=926; break;
case 959: ret=927; break;
case 960: ret=928; break;
case 961: ret=929; break;
case 963: ret=931; break;
case 964: ret=932; break;
case 965: ret=933; break;
case 966: ret=934; break;
case 967: ret=935; break;
case 968: ret=936; break;
case 969: ret=937; break;
case 970: ret=938; break;
case 971: ret=939; break;
case 972: ret=908; break;
case 973: ret=910; break;
case 974: ret=911; break;
case 976: ret=914; break;
case 977: ret=920; break;
case 981: ret=934; break;
case 982: ret=928; break;
case 995: ret=994; break;
case 997: ret=996; break;
case 999: ret=998; break;
case 1001: ret=1000; break;
case 1003: ret=1002; break;
case 1005: ret=1004; break;
case 1007: ret=1006; break;
case 1008: ret=922; break;
case 1009: ret=929; break;
case 1072: ret=1040; break;
case 1073: ret=1041; break;
case 1074: ret=1042; break;
case 1075: ret=1043; break;
case 1076: ret=1044; break;
case 1077: ret=1045; break;
case 1078: ret=1046; break;
case 1079: ret=1047; break;
case 1080: ret=1048; break;
case 1081: ret=1049; break;
case 1082: ret=1050; break;
case 1083: ret=1051; break;
case 1084: ret=1052; break;
case 1085: ret=1053; break;
case 1086: ret=1054; break;
case 1087: ret=1055; break;
case 1088: ret=1056; break;
case 1089: ret=1057; break;
case 1090: ret=1058; break;
case 1091: ret=1059; break;
case 1092: ret=1060; break;
case 1093: ret=1061; break;
case 1094: ret=1062; break;
case 1095: ret=1063; break;
case 1096: ret=1064; break;
case 1097: ret=1065; break;
case 1098: ret=1066; break;
case 1099: ret=1067; break;
case 1100: ret=1068; break;
case 1101: ret=1069; break;
case 1102: ret=1070; break;
case 1103: ret=1071; break;
case 1105: ret=1025; break;
case 1106: ret=1026; break;
case 1107: ret=1027; break;
case 1108: ret=1028; break;
case 1109: ret=1029; break;
case 1110: ret=1030; break;
case 1111: ret=1031; break;
case 1112: ret=1032; break;
case 1113: ret=1033; break;
case 1114: ret=1034; break;
case 1115: ret=1035; break;
case 1116: ret=1036; break;
case 1118: ret=1038; break;
case 1119: ret=1039; break;
case 1121: ret=1120; break;
case 1123: ret=1122; break;
case 1125: ret=1124; break;
case 1127: ret=1126; break;
case 1129: ret=1128; break;
case 1131: ret=1130; break;
case 1133: ret=1132; break;
case 1135: ret=1134; break;
case 1137: ret=1136; break;
case 1139: ret=1138; break;
case 1141: ret=1140; break;
case 1143: ret=1142; break;
case 1145: ret=1144; break;
case 1147: ret=1146; break;
case 1149: ret=1148; break;
case 1151: ret=1150; break;
case 1153: ret=1152; break;
case 1169: ret=1168; break;
case 1171: ret=1170; break;
case 1173: ret=1172; break;
case 1175: ret=1174; break;
case 1177: ret=1176; break;
case 1179: ret=1178; break;
case 1181: ret=1180; break;
case 1183: ret=1182; break;
case 1185: ret=1184; break;
case 1187: ret=1186; break;
case 1189: ret=1188; break;
case 1191: ret=1190; break;
case 1193: ret=1192; break;
case 1195: ret=1194; break;
case 1197: ret=1196; break;
case 1199: ret=1198; break;
case 1201: ret=1200; break;
case 1203: ret=1202; break;
case 1205: ret=1204; break;
case 1207: ret=1206; break;
case 1209: ret=1208; break;
case 1211: ret=1210; break;
case 1213: ret=1212; break;
case 1215: ret=1214; break;
case 1218: ret=1217; break;
case 1220: ret=1219; break;
case 1224: ret=1223; break;
case 1228: ret=1227; break;
case 1233: ret=1232; break;
case 1235: ret=1234; break;
case 1237: ret=1236; break;
case 1239: ret=1238; break;
case 1241: ret=1240; break;
case 1243: ret=1242; break;
case 1245: ret=1244; break;
case 1247: ret=1246; break;
case 1249: ret=1248; break;
case 1251: ret=1250; break;
case 1253: ret=1252; break;
case 1255: ret=1254; break;
case 1257: ret=1256; break;
case 1259: ret=1258; break;
case 1263: ret=1262; break;
case 1265: ret=1264; break;
case 1267: ret=1266; break;
case 1269: ret=1268; break;
case 1273: ret=1272; break;
case 1377: ret=1329; break;
case 1378: ret=1330; break;
case 1379: ret=1331; break;
case 1380: ret=1332; break;
case 1381: ret=1333; break;
case 1382: ret=1334; break;
case 1383: ret=1335; break;
case 1384: ret=1336; break;
case 1385: ret=1337; break;
case 1386: ret=1338; break;
case 1387: ret=1339; break;
case 1388: ret=1340; break;
case 1389: ret=1341; break;
case 1390: ret=1342; break;
case 1391: ret=1343; break;
case 1392: ret=1344; break;
case 1393: ret=1345; break;
case 1394: ret=1346; break;
case 1395: ret=1347; break;
case 1396: ret=1348; break;
case 1397: ret=1349; break;
case 1398: ret=1350; break;
case 1399: ret=1351; break;
case 1400: ret=1352; break;
case 1401: ret=1353; break;
case 1402: ret=1354; break;
case 1403: ret=1355; break;
case 1404: ret=1356; break;
case 1405: ret=1357; break;
case 1406: ret=1358; break;
case 1407: ret=1359; break;
case 1408: ret=1360; break;
case 1409: ret=1361; break;
case 1410: ret=1362; break;
case 1411: ret=1363; break;
case 1412: ret=1364; break;
case 1413: ret=1365; break;
case 1414: ret=1366; break;
case 7681: ret=7680; break;
case 7683: ret=7682; break;
case 7685: ret=7684; break;
case 7687: ret=7686; break;
case 7689: ret=7688; break;
case 7691: ret=7690; break;
case 7693: ret=7692; break;
case 7695: ret=7694; break;
case 7697: ret=7696; break;
case 7699: ret=7698; break;
case 7701: ret=7700; break;
case 7703: ret=7702; break;
case 7705: ret=7704; break;
case 7707: ret=7706; break;
case 7709: ret=7708; break;
case 7711: ret=7710; break;
case 7713: ret=7712; break;
case 7715: ret=7714; break;
case 7717: ret=7716; break;
case 7719: ret=7718; break;
case 7721: ret=7720; break;
case 7723: ret=7722; break;
case 7725: ret=7724; break;
case 7727: ret=7726; break;
case 7729: ret=7728; break;
case 7731: ret=7730; break;
case 7733: ret=7732; break;
case 7735: ret=7734; break;
case 7737: ret=7736; break;
case 7739: ret=7738; break;
case 7741: ret=7740; break;
case 7743: ret=7742; break;
case 7745: ret=7744; break;
case 7747: ret=7746; break;
case 7749: ret=7748; break;
case 7751: ret=7750; break;
case 7753: ret=7752; break;
case 7755: ret=7754; break;
case 7757: ret=7756; break;
case 7759: ret=7758; break;
case 7761: ret=7760; break;
case 7763: ret=7762; break;
case 7765: ret=7764; break;
case 7767: ret=7766; break;
case 7769: ret=7768; break;
case 7771: ret=7770; break;
case 7773: ret=7772; break;
case 7775: ret=7774; break;
case 7777: ret=7776; break;
case 7779: ret=7778; break;
case 7781: ret=7780; break;
case 7783: ret=7782; break;
case 7785: ret=7784; break;
case 7787: ret=7786; break;
case 7789: ret=7788; break;
case 7791: ret=7790; break;
case 7793: ret=7792; break;
case 7795: ret=7794; break;
case 7797: ret=7796; break;
case 7799: ret=7798; break;
case 7801: ret=7800; break;
case 7803: ret=7802; break;
case 7805: ret=7804; break;
case 7807: ret=7806; break;
case 7809: ret=7808; break;
case 7811: ret=7810; break;
case 7813: ret=7812; break;
case 7815: ret=7814; break;
case 7817: ret=7816; break;
case 7819: ret=7818; break;
case 7821: ret=7820; break;
case 7823: ret=7822; break;
case 7825: ret=7824; break;
case 7827: ret=7826; break;
case 7829: ret=7828; break;
case 7841: ret=7840; break;
case 7843: ret=7842; break;
case 7845: ret=7844; break;
case 7847: ret=7846; break;
case 7849: ret=7848; break;
case 7851: ret=7850; break;
case 7853: ret=7852; break;
case 7855: ret=7854; break;
case 7857: ret=7856; break;
case 7859: ret=7858; break;
case 7861: ret=7860; break;
case 7863: ret=7862; break;
case 7865: ret=7864; break;
case 7867: ret=7866; break;
case 7869: ret=7868; break;
case 7871: ret=7870; break;
case 7873: ret=7872; break;
case 7875: ret=7874; break;
case 7877: ret=7876; break;
case 7879: ret=7878; break;
case 7881: ret=7880; break;
case 7883: ret=7882; break;
case 7885: ret=7884; break;
case 7887: ret=7886; break;
case 7889: ret=7888; break;
case 7891: ret=7890; break;
case 7893: ret=7892; break;
case 7895: ret=7894; break;
case 7897: ret=7896; break;
case 7899: ret=7898; break;
case 7901: ret=7900; break;
case 7903: ret=7902; break;
case 7905: ret=7904; break;
case 7907: ret=7906; break;
case 7909: ret=7908; break;
case 7911: ret=7910; break;
case 7913: ret=7912; break;
case 7915: ret=7914; break;
case 7917: ret=7916; break;
case 7919: ret=7918; break;
case 7921: ret=7920; break;
case 7923: ret=7922; break;
case 7925: ret=7924; break;
case 7927: ret=7926; break;
case 7929: ret=7928; break;
case 7936: ret=7944; break;
case 7937: ret=7945; break;
case 7938: ret=7946; break;
case 7939: ret=7947; break;
case 7940: ret=7948; break;
case 7941: ret=7949; break;
case 7942: ret=7950; break;
case 7943: ret=7951; break;
case 7952: ret=7960; break;
case 7953: ret=7961; break;
case 7954: ret=7962; break;
case 7955: ret=7963; break;
case 7956: ret=7964; break;
case 7957: ret=7965; break;
case 7968: ret=7976; break;
case 7969: ret=7977; break;
case 7970: ret=7978; break;
case 7971: ret=7979; break;
case 7972: ret=7980; break;
case 7973: ret=7981; break;
case 7974: ret=7982; break;
case 7975: ret=7983; break;
case 7984: ret=7992; break;
case 7985: ret=7993; break;
case 7986: ret=7994; break;
case 7987: ret=7995; break;
case 7988: ret=7996; break;
case 7989: ret=7997; break;
case 7990: ret=7998; break;
case 7991: ret=7999; break;
case 8000: ret=8008; break;
case 8001: ret=8009; break;
case 8002: ret=8010; break;
case 8003: ret=8011; break;
case 8004: ret=8012; break;
case 8005: ret=8013; break;
case 8017: ret=8025; break;
case 8019: ret=8027; break;
case 8021: ret=8029; break;
case 8023: ret=8031; break;
case 8032: ret=8040; break;
case 8033: ret=8041; break;
case 8034: ret=8042; break;
case 8035: ret=8043; break;
case 8036: ret=8044; break;
case 8037: ret=8045; break;
case 8038: ret=8046; break;
case 8039: ret=8047; break;
case 8048: ret=8122; break;
case 8049: ret=8123; break;
case 8050: ret=8136; break;
case 8051: ret=8137; break;
case 8052: ret=8138; break;
case 8053: ret=8139; break;
case 8054: ret=8154; break;
case 8055: ret=8155; break;
case 8056: ret=8184; break;
case 8057: ret=8185; break;
case 8058: ret=8170; break;
case 8059: ret=8171; break;
case 8060: ret=8186; break;
case 8061: ret=8187; break;
case 8064: ret=8072; break;
case 8065: ret=8073; break;
case 8066: ret=8074; break;
case 8067: ret=8075; break;
case 8068: ret=8076; break;
case 8069: ret=8077; break;
case 8070: ret=8078; break;
case 8071: ret=8079; break;
case 8080: ret=8088; break;
case 8081: ret=8089; break;
case 8082: ret=8090; break;
case 8083: ret=8091; break;
case 8084: ret=8092; break;
case 8085: ret=8093; break;
case 8086: ret=8094; break;
case 8087: ret=8095; break;
case 8096: ret=8104; break;
case 8097: ret=8105; break;
case 8098: ret=8106; break;
case 8099: ret=8107; break;
case 8100: ret=8108; break;
case 8101: ret=8109; break;
case 8102: ret=8110; break;
case 8103: ret=8111; break;
case 8112: ret=8120; break;
case 8113: ret=8121; break;
case 8115: ret=8124; break;
case 8131: ret=8140; break;
case 8144: ret=8152; break;
case 8145: ret=8153; break;
case 8160: ret=8168; break;
case 8161: ret=8169; break;
case 8165: ret=8172; break;
case 8179: ret=8188; break;
case 8560: ret=8544; break;
case 8561: ret=8545; break;
case 8562: ret=8546; break;
case 8563: ret=8547; break;
case 8564: ret=8548; break;
case 8565: ret=8549; break;
case 8566: ret=8550; break;
case 8567: ret=8551; break;
case 8568: ret=8552; break;
case 8569: ret=8553; break;
case 8570: ret=8554; break;
case 8571: ret=8555; break;
case 8572: ret=8556; break;
case 8573: ret=8557; break;
case 8574: ret=8558; break;
case 8575: ret=8559; break;
case 9424: ret=9398; break;
case 9425: ret=9399; break;
case 9426: ret=9400; break;
case 9427: ret=9401; break;
case 9428: ret=9402; break;
case 9429: ret=9403; break;
case 9430: ret=9404; break;
case 9431: ret=9405; break;
case 9432: ret=9406; break;
case 9433: ret=9407; break;
case 9434: ret=9408; break;
case 9435: ret=9409; break;
case 9436: ret=9410; break;
case 9437: ret=9411; break;
case 9438: ret=9412; break;
case 9439: ret=9413; break;
case 9440: ret=9414; break;
case 9441: ret=9415; break;
case 9442: ret=9416; break;
case 9443: ret=9417; break;
case 9444: ret=9418; break;
case 9445: ret=9419; break;
case 9446: ret=9420; break;
case 9447: ret=9421; break;
case 9448: ret=9422; break;
case 9449: ret=9423; break;
case 65345: ret=65313; break;
case 65346: ret=65314; break;
case 65347: ret=65315; break;
case 65348: ret=65316; break;
case 65349: ret=65317; break;
case 65350: ret=65318; break;
case 65351: ret=65319; break;
case 65352: ret=65320; break;
case 65353: ret=65321; break;
case 65354: ret=65322; break;
case 65355: ret=65323; break;
case 65356: ret=65324; break;
case 65357: ret=65325; break;
case 65358: ret=65326; break;
case 65359: ret=65327; break;
case 65360: ret=65328; break;
case 65361: ret=65329; break;
case 65362: ret=65330; break;
case 65363: ret=65331; break;
case 65364: ret=65332; break;
case 65365: ret=65333; break;
case 65366: ret=65334; break;
case 65367: ret=65335; break;
case 65368: ret=65336; break;
case 65369: ret=65337; break;
case 65370: ret=65338; break;
}
return (char)ret;
}
return Character.toUpperCase(c);
}
/** Convert a character to lower case. */
public static char toLowerCase(char c) {
if(java_1_0) {
int ret = (int)c;
switch(c) {
case 65: ret=97; break;
case 66: ret=98; break;
case 67: ret=99; break;
case 68: ret=100; break;
case 69: ret=101; break;
case 70: ret=102; break;
case 71: ret=103; break;
case 72: ret=104; break;
case 73: ret=105; break;
case 74: ret=106; break;
case 75: ret=107; break;
case 76: ret=108; break;
case 77: ret=109; break;
case 78: ret=110; break;
case 79: ret=111; break;
case 80: ret=112; break;
case 81: ret=113; break;
case 82: ret=114; break;
case 83: ret=115; break;
case 84: ret=116; break;
case 85: ret=117; break;
case 86: ret=118; break;
case 87: ret=119; break;
case 88: ret=120; break;
case 89: ret=121; break;
case 90: ret=122; break;
case 192: ret=224; break;
case 193: ret=225; break;
case 194: ret=226; break;
case 195: ret=227; break;
case 196: ret=228; break;
case 197: ret=229; break;
case 198: ret=230; break;
case 199: ret=231; break;
case 200: ret=232; break;
case 201: ret=233; break;
case 202: ret=234; break;
case 203: ret=235; break;
case 204: ret=236; break;
case 205: ret=237; break;
case 206: ret=238; break;
case 207: ret=239; break;
case 208: ret=240; break;
case 209: ret=241; break;
case 210: ret=242; break;
case 211: ret=243; break;
case 212: ret=244; break;
case 213: ret=245; break;
case 214: ret=246; break;
case 216: ret=248; break;
case 217: ret=249; break;
case 218: ret=250; break;
case 219: ret=251; break;
case 220: ret=252; break;
case 221: ret=253; break;
case 222: ret=254; break;
case 256: ret=257; break;
case 258: ret=259; break;
case 260: ret=261; break;
case 262: ret=263; break;
case 264: ret=265; break;
case 266: ret=267; break;
case 268: ret=269; break;
case 270: ret=271; break;
case 272: ret=273; break;
case 274: ret=275; break;
case 276: ret=277; break;
case 278: ret=279; break;
case 280: ret=281; break;
case 282: ret=283; break;
case 284: ret=285; break;
case 286: ret=287; break;
case 288: ret=289; break;
case 290: ret=291; break;
case 292: ret=293; break;
case 294: ret=295; break;
case 296: ret=297; break;
case 298: ret=299; break;
case 300: ret=301; break;
case 302: ret=303; break;
case 304: ret=105; break;
case 306: ret=307; break;
case 308: ret=309; break;
case 310: ret=311; break;
case 313: ret=314; break;
case 315: ret=316; break;
case 317: ret=318; break;
case 319: ret=320; break;
case 321: ret=322; break;
case 323: ret=324; break;
case 325: ret=326; break;
case 327: ret=328; break;
case 330: ret=331; break;
case 332: ret=333; break;
case 334: ret=335; break;
case 336: ret=337; break;
case 338: ret=339; break;
case 340: ret=341; break;
case 342: ret=343; break;
case 344: ret=345; break;
case 346: ret=347; break;
case 348: ret=349; break;
case 350: ret=351; break;
case 352: ret=353; break;
case 354: ret=355; break;
case 356: ret=357; break;
case 358: ret=359; break;
case 360: ret=361; break;
case 362: ret=363; break;
case 364: ret=365; break;
case 366: ret=367; break;
case 368: ret=369; break;
case 370: ret=371; break;
case 372: ret=373; break;
case 374: ret=375; break;
case 376: ret=255; break;
case 377: ret=378; break;
case 379: ret=380; break;
case 381: ret=382; break;
case 385: ret=595; break;
case 386: ret=387; break;
case 388: ret=389; break;
case 390: ret=596; break;
case 391: ret=392; break;
case 393: ret=598; break;
case 394: ret=599; break;
case 395: ret=396; break;
case 398: ret=600; break;
case 399: ret=601; break;
case 400: ret=603; break;
case 401: ret=402; break;
case 403: ret=608; break;
case 404: ret=611; break;
case 406: ret=617; break;
case 407: ret=616; break;
case 408: ret=409; break;
case 412: ret=623; break;
case 413: ret=626; break;
case 416: ret=417; break;
case 418: ret=419; break;
case 420: ret=421; break;
case 423: ret=424; break;
case 425: ret=643; break;
case 428: ret=429; break;
case 430: ret=648; break;
case 431: ret=432; break;
case 433: ret=650; break;
case 434: ret=651; break;
case 435: ret=436; break;
case 437: ret=438; break;
case 439: ret=658; break;
case 440: ret=441; break;
case 444: ret=445; break;
case 452: ret=454; break;
case 453: ret=454; break;
case 455: ret=457; break;
case 456: ret=457; break;
case 458: ret=460; break;
case 459: ret=460; break;
case 461: ret=462; break;
case 463: ret=464; break;
case 465: ret=466; break;
case 467: ret=468; break;
case 469: ret=470; break;
case 471: ret=472; break;
case 473: ret=474; break;
case 475: ret=476; break;
case 478: ret=479; break;
case 480: ret=481; break;
case 482: ret=483; break;
case 484: ret=485; break;
case 486: ret=487; break;
case 488: ret=489; break;
case 490: ret=491; break;
case 492: ret=493; break;
case 494: ret=495; break;
case 497: ret=499; break;
case 498: ret=499; break;
case 500: ret=501; break;
case 506: ret=507; break;
case 508: ret=509; break;
case 510: ret=511; break;
case 512: ret=513; break;
case 514: ret=515; break;
case 516: ret=517; break;
case 518: ret=519; break;
case 520: ret=521; break;
case 522: ret=523; break;
case 524: ret=525; break;
case 526: ret=527; break;
case 528: ret=529; break;
case 530: ret=531; break;
case 532: ret=533; break;
case 534: ret=535; break;
case 902: ret=940; break;
case 904: ret=941; break;
case 905: ret=942; break;
case 906: ret=943; break;
case 908: ret=972; break;
case 910: ret=973; break;
case 911: ret=974; break;
case 913: ret=945; break;
case 914: ret=946; break;
case 915: ret=947; break;
case 916: ret=948; break;
case 917: ret=949; break;
case 918: ret=950; break;
case 919: ret=951; break;
case 920: ret=952; break;
case 921: ret=953; break;
case 922: ret=954; break;
case 923: ret=955; break;
case 924: ret=956; break;
case 925: ret=957; break;
case 926: ret=958; break;
case 927: ret=959; break;
case 928: ret=960; break;
case 929: ret=961; break;
case 931: ret=963; break;
case 932: ret=964; break;
case 933: ret=965; break;
case 934: ret=966; break;
case 935: ret=967; break;
case 936: ret=968; break;
case 937: ret=969; break;
case 938: ret=970; break;
case 939: ret=971; break;
case 994: ret=995; break;
case 996: ret=997; break;
case 998: ret=999; break;
case 1000: ret=1001; break;
case 1002: ret=1003; break;
case 1004: ret=1005; break;
case 1006: ret=1007; break;
case 1025: ret=1105; break;
case 1026: ret=1106; break;
case 1027: ret=1107; break;
case 1028: ret=1108; break;
case 1029: ret=1109; break;
case 1030: ret=1110; break;
case 1031: ret=1111; break;
case 1032: ret=1112; break;
case 1033: ret=1113; break;
case 1034: ret=1114; break;
case 1035: ret=1115; break;
case 1036: ret=1116; break;
case 1038: ret=1118; break;
case 1039: ret=1119; break;
case 1040: ret=1072; break;
case 1041: ret=1073; break;
case 1042: ret=1074; break;
case 1043: ret=1075; break;
case 1044: ret=1076; break;
case 1045: ret=1077; break;
case 1046: ret=1078; break;
case 1047: ret=1079; break;
case 1048: ret=1080; break;
case 1049: ret=1081; break;
case 1050: ret=1082; break;
case 1051: ret=1083; break;
case 1052: ret=1084; break;
case 1053: ret=1085; break;
case 1054: ret=1086; break;
case 1055: ret=1087; break;
case 1056: ret=1088; break;
case 1057: ret=1089; break;
case 1058: ret=1090; break;
case 1059: ret=1091; break;
case 1060: ret=1092; break;
case 1061: ret=1093; break;
case 1062: ret=1094; break;
case 1063: ret=1095; break;
case 1064: ret=1096; break;
case 1065: ret=1097; break;
case 1066: ret=1098; break;
case 1067: ret=1099; break;
case 1068: ret=1100; break;
case 1069: ret=1101; break;
case 1070: ret=1102; break;
case 1071: ret=1103; break;
case 1120: ret=1121; break;
case 1122: ret=1123; break;
case 1124: ret=1125; break;
case 1126: ret=1127; break;
case 1128: ret=1129; break;
case 1130: ret=1131; break;
case 1132: ret=1133; break;
case 1134: ret=1135; break;
case 1136: ret=1137; break;
case 1138: ret=1139; break;
case 1140: ret=1141; break;
case 1142: ret=1143; break;
case 1144: ret=1145; break;
case 1146: ret=1147; break;
case 1148: ret=1149; break;
case 1150: ret=1151; break;
case 1152: ret=1153; break;
case 1168: ret=1169; break;
case 1170: ret=1171; break;
case 1172: ret=1173; break;
case 1174: ret=1175; break;
case 1176: ret=1177; break;
case 1178: ret=1179; break;
case 1180: ret=1181; break;
case 1182: ret=1183; break;
case 1184: ret=1185; break;
case 1186: ret=1187; break;
case 1188: ret=1189; break;
case 1190: ret=1191; break;
case 1192: ret=1193; break;
case 1194: ret=1195; break;
case 1196: ret=1197; break;
case 1198: ret=1199; break;
case 1200: ret=1201; break;
case 1202: ret=1203; break;
case 1204: ret=1205; break;
case 1206: ret=1207; break;
case 1208: ret=1209; break;
case 1210: ret=1211; break;
case 1212: ret=1213; break;
case 1214: ret=1215; break;
case 1217: ret=1218; break;
case 1219: ret=1220; break;
case 1223: ret=1224; break;
case 1227: ret=1228; break;
case 1232: ret=1233; break;
case 1234: ret=1235; break;
case 1236: ret=1237; break;
case 1238: ret=1239; break;
case 1240: ret=1241; break;
case 1242: ret=1243; break;
case 1244: ret=1245; break;
case 1246: ret=1247; break;
case 1248: ret=1249; break;
case 1250: ret=1251; break;
case 1252: ret=1253; break;
case 1254: ret=1255; break;
case 1256: ret=1257; break;
case 1258: ret=1259; break;
case 1262: ret=1263; break;
case 1264: ret=1265; break;
case 1266: ret=1267; break;
case 1268: ret=1269; break;
case 1272: ret=1273; break;
case 1329: ret=1377; break;
case 1330: ret=1378; break;
case 1331: ret=1379; break;
case 1332: ret=1380; break;
case 1333: ret=1381; break;
case 1334: ret=1382; break;
case 1335: ret=1383; break;
case 1336: ret=1384; break;
case 1337: ret=1385; break;
case 1338: ret=1386; break;
case 1339: ret=1387; break;
case 1340: ret=1388; break;
case 1341: ret=1389; break;
case 1342: ret=1390; break;
case 1343: ret=1391; break;
case 1344: ret=1392; break;
case 1345: ret=1393; break;
case 1346: ret=1394; break;
case 1347: ret=1395; break;
case 1348: ret=1396; break;
case 1349: ret=1397; break;
case 1350: ret=1398; break;
case 1351: ret=1399; break;
case 1352: ret=1400; break;
case 1353: ret=1401; break;
case 1354: ret=1402; break;
case 1355: ret=1403; break;
case 1356: ret=1404; break;
case 1357: ret=1405; break;
case 1358: ret=1406; break;
case 1359: ret=1407; break;
case 1360: ret=1408; break;
case 1361: ret=1409; break;
case 1362: ret=1410; break;
case 1363: ret=1411; break;
case 1364: ret=1412; break;
case 1365: ret=1413; break;
case 1366: ret=1414; break;
case 4256: ret=4304; break;
case 4257: ret=4305; break;
case 4258: ret=4306; break;
case 4259: ret=4307; break;
case 4260: ret=4308; break;
case 4261: ret=4309; break;
case 4262: ret=4310; break;
case 4263: ret=4311; break;
case 4264: ret=4312; break;
case 4265: ret=4313; break;
case 4266: ret=4314; break;
case 4267: ret=4315; break;
case 4268: ret=4316; break;
case 4269: ret=4317; break;
case 4270: ret=4318; break;
case 4271: ret=4319; break;
case 4272: ret=4320; break;
case 4273: ret=4321; break;
case 4274: ret=4322; break;
case 4275: ret=4323; break;
case 4276: ret=4324; break;
case 4277: ret=4325; break;
case 4278: ret=4326; break;
case 4279: ret=4327; break;
case 4280: ret=4328; break;
case 4281: ret=4329; break;
case 4282: ret=4330; break;
case 4283: ret=4331; break;
case 4284: ret=4332; break;
case 4285: ret=4333; break;
case 4286: ret=4334; break;
case 4287: ret=4335; break;
case 4288: ret=4336; break;
case 4289: ret=4337; break;
case 4290: ret=4338; break;
case 4291: ret=4339; break;
case 4292: ret=4340; break;
case 4293: ret=4341; break;
case 7680: ret=7681; break;
case 7682: ret=7683; break;
case 7684: ret=7685; break;
case 7686: ret=7687; break;
case 7688: ret=7689; break;
case 7690: ret=7691; break;
case 7692: ret=7693; break;
case 7694: ret=7695; break;
case 7696: ret=7697; break;
case 7698: ret=7699; break;
case 7700: ret=7701; break;
case 7702: ret=7703; break;
case 7704: ret=7705; break;
case 7706: ret=7707; break;
case 7708: ret=7709; break;
case 7710: ret=7711; break;
case 7712: ret=7713; break;
case 7714: ret=7715; break;
case 7716: ret=7717; break;
case 7718: ret=7719; break;
case 7720: ret=7721; break;
case 7722: ret=7723; break;
case 7724: ret=7725; break;
case 7726: ret=7727; break;
case 7728: ret=7729; break;
case 7730: ret=7731; break;
case 7732: ret=7733; break;
case 7734: ret=7735; break;
case 7736: ret=7737; break;
case 7738: ret=7739; break;
case 7740: ret=7741; break;
case 7742: ret=7743; break;
case 7744: ret=7745; break;
case 7746: ret=7747; break;
case 7748: ret=7749; break;
case 7750: ret=7751; break;
case 7752: ret=7753; break;
case 7754: ret=7755; break;
case 7756: ret=7757; break;
case 7758: ret=7759; break;
case 7760: ret=7761; break;
case 7762: ret=7763; break;
case 7764: ret=7765; break;
case 7766: ret=7767; break;
case 7768: ret=7769; break;
case 7770: ret=7771; break;
case 7772: ret=7773; break;
case 7774: ret=7775; break;
case 7776: ret=7777; break;
case 7778: ret=7779; break;
case 7780: ret=7781; break;
case 7782: ret=7783; break;
case 7784: ret=7785; break;
case 7786: ret=7787; break;
case 7788: ret=7789; break;
case 7790: ret=7791; break;
case 7792: ret=7793; break;
case 7794: ret=7795; break;
case 7796: ret=7797; break;
case 7798: ret=7799; break;
case 7800: ret=7801; break;
case 7802: ret=7803; break;
case 7804: ret=7805; break;
case 7806: ret=7807; break;
case 7808: ret=7809; break;
case 7810: ret=7811; break;
case 7812: ret=7813; break;
case 7814: ret=7815; break;
case 7816: ret=7817; break;
case 7818: ret=7819; break;
case 7820: ret=7821; break;
case 7822: ret=7823; break;
case 7824: ret=7825; break;
case 7826: ret=7827; break;
case 7828: ret=7829; break;
case 7840: ret=7841; break;
case 7842: ret=7843; break;
case 7844: ret=7845; break;
case 7846: ret=7847; break;
case 7848: ret=7849; break;
case 7850: ret=7851; break;
case 7852: ret=7853; break;
case 7854: ret=7855; break;
case 7856: ret=7857; break;
case 7858: ret=7859; break;
case 7860: ret=7861; break;
case 7862: ret=7863; break;
case 7864: ret=7865; break;
case 7866: ret=7867; break;
case 7868: ret=7869; break;
case 7870: ret=7871; break;
case 7872: ret=7873; break;
case 7874: ret=7875; break;
case 7876: ret=7877; break;
case 7878: ret=7879; break;
case 7880: ret=7881; break;
case 7882: ret=7883; break;
case 7884: ret=7885; break;
case 7886: ret=7887; break;
case 7888: ret=7889; break;
case 7890: ret=7891; break;
case 7892: ret=7893; break;
case 7894: ret=7895; break;
case 7896: ret=7897; break;
case 7898: ret=7899; break;
case 7900: ret=7901; break;
case 7902: ret=7903; break;
case 7904: ret=7905; break;
case 7906: ret=7907; break;
case 7908: ret=7909; break;
case 7910: ret=7911; break;
case 7912: ret=7913; break;
case 7914: ret=7915; break;
case 7916: ret=7917; break;
case 7918: ret=7919; break;
case 7920: ret=7921; break;
case 7922: ret=7923; break;
case 7924: ret=7925; break;
case 7926: ret=7927; break;
case 7928: ret=7929; break;
case 7944: ret=7936; break;
case 7945: ret=7937; break;
case 7946: ret=7938; break;
case 7947: ret=7939; break;
case 7948: ret=7940; break;
case 7949: ret=7941; break;
case 7950: ret=7942; break;
case 7951: ret=7943; break;
case 7960: ret=7952; break;
case 7961: ret=7953; break;
case 7962: ret=7954; break;
case 7963: ret=7955; break;
case 7964: ret=7956; break;
case 7965: ret=7957; break;
case 7976: ret=7968; break;
case 7977: ret=7969; break;
case 7978: ret=7970; break;
case 7979: ret=7971; break;
case 7980: ret=7972; break;
case 7981: ret=7973; break;
case 7982: ret=7974; break;
case 7983: ret=7975; break;
case 7992: ret=7984; break;
case 7993: ret=7985; break;
case 7994: ret=7986; break;
case 7995: ret=7987; break;
case 7996: ret=7988; break;
case 7997: ret=7989; break;
case 7998: ret=7990; break;
case 7999: ret=7991; break;
case 8008: ret=8000; break;
case 8009: ret=8001; break;
case 8010: ret=8002; break;
case 8011: ret=8003; break;
case 8012: ret=8004; break;
case 8013: ret=8005; break;
case 8025: ret=8017; break;
case 8027: ret=8019; break;
case 8029: ret=8021; break;
case 8031: ret=8023; break;
case 8040: ret=8032; break;
case 8041: ret=8033; break;
case 8042: ret=8034; break;
case 8043: ret=8035; break;
case 8044: ret=8036; break;
case 8045: ret=8037; break;
case 8046: ret=8038; break;
case 8047: ret=8039; break;
case 8072: ret=8064; break;
case 8073: ret=8065; break;
case 8074: ret=8066; break;
case 8075: ret=8067; break;
case 8076: ret=8068; break;
case 8077: ret=8069; break;
case 8078: ret=8070; break;
case 8079: ret=8071; break;
case 8088: ret=8080; break;
case 8089: ret=8081; break;
case 8090: ret=8082; break;
case 8091: ret=8083; break;
case 8092: ret=8084; break;
case 8093: ret=8085; break;
case 8094: ret=8086; break;
case 8095: ret=8087; break;
case 8104: ret=8096; break;
case 8105: ret=8097; break;
case 8106: ret=8098; break;
case 8107: ret=8099; break;
case 8108: ret=8100; break;
case 8109: ret=8101; break;
case 8110: ret=8102; break;
case 8111: ret=8103; break;
case 8120: ret=8112; break;
case 8121: ret=8113; break;
case 8122: ret=8048; break;
case 8123: ret=8049; break;
case 8124: ret=8115; break;
case 8136: ret=8050; break;
case 8137: ret=8051; break;
case 8138: ret=8052; break;
case 8139: ret=8053; break;
case 8140: ret=8131; break;
case 8152: ret=8144; break;
case 8153: ret=8145; break;
case 8154: ret=8054; break;
case 8155: ret=8055; break;
case 8168: ret=8160; break;
case 8169: ret=8161; break;
case 8170: ret=8058; break;
case 8171: ret=8059; break;
case 8172: ret=8165; break;
case 8184: ret=8056; break;
case 8185: ret=8057; break;
case 8186: ret=8060; break;
case 8187: ret=8061; break;
case 8188: ret=8179; break;
case 8544: ret=8560; break;
case 8545: ret=8561; break;
case 8546: ret=8562; break;
case 8547: ret=8563; break;
case 8548: ret=8564; break;
case 8549: ret=8565; break;
case 8550: ret=8566; break;
case 8551: ret=8567; break;
case 8552: ret=8568; break;
case 8553: ret=8569; break;
case 8554: ret=8570; break;
case 8555: ret=8571; break;
case 8556: ret=8572; break;
case 8557: ret=8573; break;
case 8558: ret=8574; break;
case 8559: ret=8575; break;
case 9398: ret=9424; break;
case 9399: ret=9425; break;
case 9400: ret=9426; break;
case 9401: ret=9427; break;
case 9402: ret=9428; break;
case 9403: ret=9429; break;
case 9404: ret=9430; break;
case 9405: ret=9431; break;
case 9406: ret=9432; break;
case 9407: ret=9433; break;
case 9408: ret=9434; break;
case 9409: ret=9435; break;
case 9410: ret=9436; break;
case 9411: ret=9437; break;
case 9412: ret=9438; break;
case 9413: ret=9439; break;
case 9414: ret=9440; break;
case 9415: ret=9441; break;
case 9416: ret=9442; break;
case 9417: ret=9443; break;
case 9418: ret=9444; break;
case 9419: ret=9445; break;
case 9420: ret=9446; break;
case 9421: ret=9447; break;
case 9422: ret=9448; break;
case 9423: ret=9449; break;
case 65313: ret=65345; break;
case 65314: ret=65346; break;
case 65315: ret=65347; break;
case 65316: ret=65348; break;
case 65317: ret=65349; break;
case 65318: ret=65350; break;
case 65319: ret=65351; break;
case 65320: ret=65352; break;
case 65321: ret=65353; break;
case 65322: ret=65354; break;
case 65323: ret=65355; break;
case 65324: ret=65356; break;
case 65325: ret=65357; break;
case 65326: ret=65358; break;
case 65327: ret=65359; break;
case 65328: ret=65360; break;
case 65329: ret=65361; break;
case 65330: ret=65362; break;
case 65331: ret=65363; break;
case 65332: ret=65364; break;
case 65333: ret=65365; break;
case 65334: ret=65366; break;
case 65335: ret=65367; break;
case 65336: ret=65368; break;
case 65337: ret=65369; break;
case 65338: ret=65370; break;
}
return (char)ret;
}
return Character.toLowerCase(c);
}
/** Convert a String to title case. */
public static String toTitleCase(String s) {
StringBuffer sb = new StringBuffer();
for(int i=0;i