我想用字符串表示""java char ch = an empty character;中的一个...
像那样 ""
实际上我想在不留空间的情况下替换角色.
我认为理解这意味着什么就足够了:char ch = an empty character;.
我有一个字符串 A função,Ãugent在我需要更换字符像ç,ã,Ã空字符串.
如何只匹配那些非ASCII字符?
我正在使用一个功能
public static String matchAndReplaceNonEnglishChar(String tmpsrcdta)
{
String newsrcdta = null;
char array[] = Arrays.stringToCharArray(tmpsrcdta);
if (array == null)
return newsrcdta;
for (int i = 0; i < array.length; i++)
{
int nVal = (int)array[i];
boolean bISO = Character.isISOControl(array[i]); // Is character ISO control
boolean bIgnorable = Character.isIdentifierIgnorable(array[i]); // Is Ignorable identifier
// Remove tab and other unwanted characters..
if (nVal == 9 || bISO || bIgnorable) …Run Code Online (Sandbox Code Playgroud)