js大写变小写小写变大写
…posted by davidjmedlock:
…由 davidjmedlock 发布 :
This originated out of some project I was thinking about doing and I though it’d be useful for others. These functions check to see if a character is upper case or lower case:
这源于我正在考虑做的某个项目,尽管它对其他人很有用。 这些函数检查字符是大写还是小写:
function isUpperCase(character) { if (Asc(character) gte 65 and Asc(character) lte 90) { return true; } else { return false; } }
function isUpperCase(character) { if (Asc(character) gte 65 and Asc(character) lte 90) { return true; } else { return false; } }
function isLowerCase(character) { if (Asc(character) gte 97 and Asc(character) lte 122) { return true; } else { return false; } }
函数isLowerCase(character){if(Asc(character)gte 97 and Asc(character)lte 122){return true; } else {返回false; }}
#isUpperCase("A")# #isLowerCase("A")# #isUpperCase("a")# #isLowerCase("a")#
#isUpperCase(“ A”)##isLowerCase(“ A”)##isUpperCase(“ a”)##isLowerCase(“ a”)#
Have fun with it.
玩得开心。
翻译自: https://www.sitepoint.com/upper-case-lower-case-functions/
js大写变小写小写变大写
相关资源:大小写转换,大写转小写,小写转大写,首字母大写