Conversion between traditional Chinese characters and simplified Chinese characters

Source: Internet
Author: User

 

/*
* $ ID: changecode. Java $
*
* From: http://thorlst.blog.163.com/blog/static/59275749201122402041317/
*/
Package com. bizatworktech. bizessence. In. Web. util;

Import java. util. arrays;

Public class changecode {
Public final static string simplechar = "The Lost and dry husband takes the lead in the Bureau. Fortunately, our staff hired the best hacker to fight the power of the inner book and do not strip the shovel. zha Shengji Yun Hui Yu Wu Yu Nian Q title rock taste evil su back to the country when the collection of orders Yao reported Alkali dust brick life dream Shan entertainment aunt lazy during the first kunji festival, yuanxiao zha Rong disk regulation Yu Qin Yu destroyed the ball Pan pollution did not louddb for acid and visible silicon salt mi Lu bald rice tax Gu Yingying festival fan xiaomiao key correction Ji Yun about red glutinous rice grain NEO pure PI yarn Yarn different levels of paper are different, and the final group is broken together. yellow green silk yun after the renewal, you can continue to wrap your cables around and scold you. guan Shu's book, book, program news, discuss, train, answer, comment, and comment repeat the inquiry and try the poems, and then let us know the details. please forgive me for your remarks. I would like to talk about Xie Yao's mistakes. I would like to talk about the translation of Tan spectrum, and I would like to read and accept the money and money from poor goods vendors. greedy for storing your credit, money, loan, money, money gambling depends on the yuan to earn a shopping competition, the Yuan gift, the fake yuan win, the loss of the car rolling track, the Xuan Yi yoke, the soft yarn, the axis, the other two, the more powerful serial Number of auxiliary light vehicle rims and roller generations of the generation of the series of the production cobalt iron diamond, bismuth, platinum, platinum, pliers, rivet, lead, molybdenum, taobaota, tolerance, chromium, silver, and silver, copper, silver, copper, enamel, iridium, indium, ammonium, bismuth, sulfur, zinc, and other cutting-edge rust-resistant Antimony files aluminum scaling zinc-barium-coated copper-coated silver-coated saw Steel the ingot was used for the determination of the cadmium contents in the zinc client. tungsten zookeeper Radix louddb for layer-7 louddb for layer-7 louddb for layer-7 louddb for layer-7 louddb for layer-7 louddb for layer-7 please refer to the following link for more information: shun Yao Jing the wind and the wind in the wind, the grass, the rice, the food, the food, the ornaments, the dumplings, the cakes, the bait, the food, the food the bread of the bread and bread of the bread manger the hacker was a hacker, and he was a hacker. zookeeper Catfish (catfish) the Chinese catfish and the Chinese catfish have been caught in the Chinese carp. eel bread catfish they are the best choice for the future. zookeeper and zookeeper yarun yi long yi Gu Wan and ugly professional Cong Dong Si two Yan funeral Yi Feng Lin Li Ju Yiwu leqiao Xi Xiang book buy chaos in the loss of cloud Genya production of Mu qinyi Yi yuan only from the Lun warehouse price of the crowd, the best team will attack the umbrella Wei Chuan hurt the Lun Peng pseudo queue, the rest of the Commission, the hero, the investigation side of the Overseas Chinese hacker, his friends the two lianyi debts are dumped, and the buckets are stored, and the party LAN guanxingz raises the animal, Yungang, writes the junnong Feng, and determines the freezing condition. The miserable Ling will be reduced to a few Phoenix with Kai. when I hit the hacker, I cut my opinion on Liu, then I just created and deleted the hacker, the hacker, and the hacker. the office of the factory is tired of being overwhelmed by the pressure of the kitchen, the city, the kitchen, the county, the double hair, the change, the leaf number, the sigh, and then scare Lu? why? heartbeat the powerful shell pot is enough to boast and win the beautiful Fen prize. xuexiang ningbao real pet audit Xian Gong Kuan bin bed to find the dead layer of the dead layer belongs to repeated Yu, the age of the gang yi island Ling Yue yi tongxia Yu the accounts of the handsome coin, the curtain, and the frame of the tent are used to help the wide village, and the temple, and the waste of the temple. mi Yu bending bullet recording the entire path Yu Yi Yu Huai state Yu i'm afraid I'm used to being angry, and I'm willing to block it. choose to hang up, roll around, roll around, grab loss, pick up, shake it, roll it, roll it around, roll it around, stir it up, stir it up xiao, Xiao Hui, Xiao, Xiao Hui, xiao shu shuzao zhuyun gun fengxiao cabinet zhuyun standard stack zhuyun building Fengqi barrier shuqi sample zookeeper luanqi bridge zhuqiao zhuhua propeller pile zhuyun Inspection loudid candied zookeeper and zookeeper of the Gas Hydrogen and argon hybriddb. tang shaogou, Li shaocang, Li shaoyu, Shanghai, Li Xiaoyu, Li shaoyu, Li shaoyu heavy scalpers flood and troughs lubintan taobaoyi yi Ling canyi furnace stew Wei Yi points refining yi rotten hydrocarbon candle smoke annoying burn ye braised hot ash Huan HUan yi ye yellow yi Xi Li Xu Shuo Li indeed, it is a waste of money and a waste of money. zhuzhu sifted zizheng, raising and signing a simplified pair of zookeeper, a basket of baskets, and a variety of zookeeper, Guangdong, and Guangdong qiaoqiao zookeeper account loose title and title: congcong su intestinal skin kidney swelling and threat: Gall, titanium gum, dirty umbilical brain pus, foot, and face wax-cured ankle greasy sputum yi Teng Yu Ship Cabin Yu Yan Yi Wu Lu Yi yi Ling Cang Ying Ping Jing Jian Wei Xiao Yu the drug Lilian Ling Ying Yu Luo Yu Xiao Sa onion Ling Jiang Yu Lan Ji Ling Yu even though the shrimps have been infected with the ant's silkworms, oysters, oysters, and other moles, and moles when your slack pants are worn out, you may find your best reputation. the death of the dead and the death of Liao Da migrated to the game and this was far in violation of the late Yao suitable for selection of the delivery of the missing DENG Xiao mail and the neighboring Yu Zheng Yu zookeeper zookeeper soy sauce fermented and released by the giant identification of zookeeper zhongkui team yang yin Tianji Lu Chen Yu Shaanxi Provincial insurance with the hidden likes difficult to young niignishi modemi jing Yu Yun Yu hip epadatat Yu school Yu Zhi system only pine surface quasi fight ";

Private Final Static char [] simplechars;

Private Final Static char [] simplechars2;

Public final static string longedchar = "returns and returns missing bytes of memory before being written. Please refer to the following example for more information: there are too many problems when reading these questions. please refer to the following link for more information: there are two major causes of death. please refer to the following link for more information: please refer to the following link for more information: there are already some economic and technical difficulties in creating large numbers of websites. Some websites have been released. please refer to the following link for more information: there are two major challenges: I think there are two problems in the future. I think there are two major problems in the future. please refer to the following link for more information: he said that he was the author of this article. please refer to the following link for more information: there are two major challenges: please refer to the following link for our technical support: Please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: there is a huge amount of money in the market. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: there have been several attempts to improve the performance of these products. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: there are two major problems in the industry: There are two major problems in the industry. I have provided some suggestions on how to adjust the legal provisions of Alibaba Cloud's legal representative websites. I have been using Alibaba Cloud's legal representative team for many years. the website will be released soon. Our website has been released. please refer to the following link for more information: alibaba Cloud has made great efforts to improve the efficiency of its own business operations. why does it happen? please refer to the following link for more information: during the peak hours, the number of users in the market was reduced, and the number of users in the market was reduced. there are two major problems in the future. I have written some practical ideas. I have written some ideas about the future growth of our competitors. please refer to the following link for more information: when I open a ticket, I have been reading the ticket. they have already been used, yet they have already been used. please refer to the following link for more information: please refer to the following link for more information: the machine license authority is provided as follows: please refer to the following link for more information: there are two major problems in the market. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: there has been a huge number of attacks in the market, which has been reported during peak hours. please refer to the following link for more information: please refer to the following link for more information: there are two major causes for this problem: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: ";

Private Final Static char [] longedchars;

Private Final Static char [] longedchars2;

Static {
If (simplechar. Length ()! = Longedchar. Length ()){
Throw new illegalargumentexception ();
}

{
Simplechars = simplechar. tochararray ();
Arrays. Sort (simplechars );
Longedchars2 = new char [simplechars. Length];

For (INT I = 0; I <simplechars. length; I ++ ){
Longedchars2 [I] = longedchar. charat (simplechar
. Indexof (simplechars [I]);
}
}

{
Longedchars = longedchar. tochararray ();
Arrays. Sort (longedchars );
Simplechars2 = new char [longedchars. Length];

For (INT I = 0; I <longedchars. length; I ++ ){
Simplechars2 [I] = simplechar. charat (longedchar
. Indexof (longedchars [I]);
}
}

If (! Tolong (simplechar). Equals (longedchar )){
Throw new illegalargumentexception ();
}

If (! Tolong (longedchar). Equals (longedchar )){
Throw new illegalargumentexception ();
}

If (! Tosimple (simplechar). Equals (simplechar )){
Throw new illegalargumentexception ();
}

If (! Tosimple (longedchar). Equals (simplechar )){
Throw new illegalargumentexception ();
}
}

// Convert to traditional Chinese
Public static string tolong (string Str ){
Char [] cs = Str. tochararray ();

Int W;
For (INT I = 0; I <CS. length; I ++ ){
If (W = arrays. binarysearch (simplechars, CS [I])> = 0 ){
CS [I] = longedchars2 [w];
}
}

Return new string (CS );
}

// Convert to simplified
Public static string tosimple (string Str ){
Char [] cs = Str. tochararray ();

Int W;
For (INT I = 0; I <CS. length; I ++ ){
If (W = arrays. binarysearch (longedchars, CS [I])> = 0 ){
CS [I] = simplechars2 [w];
}
}

Return new string (CS );
}

Public static void main (string [] ARGs ){
Long start = system. currenttimemillis ();
System. Out. println (simplechar. Length ());
System. Out. println (tolong (simplechar). Equals (longedchar ));
System. Out. println (tolong (longedchar). Equals (longedchar ));
System. Out. println (tosimple (simplechar). Equals (simplechar ));
System. Out. println (tosimple (longedchar). Equals (simplechar ));
System. Out. println (system. currenttimemillis ()-Start );
System. Out. println (tosimple ("Clock"). Equals ("Clock "));
}
}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.