/**********************************************************
* 函数名: IsEnglishCharacter
* 机能概要: 判断是否全为英文字母
*
* 参数: strin
* 返回值: True 全为英文字母
* False 不全为英文字母
*********************************************************/ public static boolean IsEnglishCharacter(String strin)
{
char c;
for( int i=0 ; i
c = strin.charAt (i);
if (( c <= 0x007A && c >= 0x0061 ) == false &&
( c <= 0x005A && c >= 0x0041 ) == false )
return false;
}
return true;
}
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12379366/viewspace-85555/
,如需转载,请注明出处,否则将追究法律责任。