I have a string variable which is a paragraph containing both English and Japanese words. I want to split Japanese from English.
So I use the Unicode to decide whether the character falls into \u+0000~ \u+007F (basic Latin unicode)
But I don't know how to write the Java code to convert char to unicode, and how to compare unicode.
Anyone can give me a sample?
public void split(String str){
char[]cstr=str.toCharArray();
String en = "";
String jp = "";
for(char c: cstr){
//(1) To Unicode?
//(2) How to check whether fall into \u0000 ~ \u007F
if(is_en) en+=c;
else jp+=c;
}
}