Checks if a string is lower case.
Convert the given string to lower case, using string.ToLower()
and compare it to the original.
代码实现
public static partial class _30s
{
public static bool IsLower(string str)
{
return str.ToLower() == str;
}
}
使用样例
string s1 = "abc";
string s2 = "cDe";
_30s.IsLower(s1); // true
_30s.IsLower(s2); // false