Char.IsLower 方法
定义
指示 Unicode 字符是否属于小写字母类别。Indicates whether a Unicode character is categorized as a lowercase letter.
重载
| IsLower(Char) |
指示指定的 Unicode 字符是否属于小写字母类别。Indicates whether the specified Unicode character is categorized as a lowercase letter. |
| IsLower(String, Int32) |
指示指定字符串中位于指定位置处的字符是否属于小写字母类别。Indicates whether the character at the specified position in a specified string is categorized as a lowercase letter. |
示例
下面的代码示例演示了 IsLower 。The following code example demonstrates IsLower.
using namespace System;
int main()
{
char ch = 'a';
Console::WriteLine( Char::IsLower( ch ) ); // Output: "True"
Console::WriteLine( Char::IsLower( "upperCase", 5 ) ); // Output: "False"
}
using System;
public class IsLowerSample {
public static void Main() {
char ch = 'a';
Console.WriteLine(Char.IsLower(ch)); // Output: "True"
Console.WriteLine(Char.IsLower("upperCase", 5)); // Output: "False"
}
}
Module IsLowerSample
Sub Main()
Dim ch As Char
ch = "a"c
Console.WriteLine(Char.IsLower(ch)) ' Output: "True"
Console.WriteLine(Char.IsLower("upperCase", 5)) ' Output: "False"
End Sub
End Module
IsLower(Char)
指示指定的 Unicode 字符是否属于小写字母类别。Indicates whether the specified Unicode character is categorized as a lowercase letter.
public:
static bool IsLower(char c);
public static bool IsLower (char c);
static member IsLower : char -> bool
Public Shared Function IsLower (c As Char) As Boolean
参数
- c
- Char
要计算的 Unicode 字符。The Unicode character to evaluate.
返回
如果 true 是一个小写字母,则为 c;否则为 false。true if c is a lowercase letter; otherwise, false.
注解
有效的小写字母是中以下类别的成员 UnicodeCategory : LowercaseLetter 。Valid lowercase letters are members of the following category in UnicodeCategory: LowercaseLetter.
另请参阅
适用于
IsLower(String, Int32)
指示指定字符串中位于指定位置处的字符是否属于小写字母类别。Indicates whether the character at the specified position in a specified string is categorized as a lowercase letter.
public:
static bool IsLower(System::String ^ s, int index);
public static bool IsLower (string s, int index);
static member IsLower : string * int -> bool
Public Shared Function IsLower (s As String, index As Integer) As Boolean
参数
- s
- String
一个字符串。A string.
- index
- Int32
s 中要计算的字符的位置。The position of the character to evaluate in s.
返回
如果 true 中位于 index 的字符是一个小写字母,则为 s;否则为 false。true if the character at position index in s is a lowercase letter; otherwise, false.
例外
s 为 null。s is null.
index 小于零或大于 s 中最后一个位置。index is less than zero or greater than the last position in s.
注解
字符串中的字符位置从零开始索引。Character positions in a string are indexed starting from zero.
有效的小写字母是中以下类别的成员 UnicodeCategory : LowercaseLetter 。Valid lowercase letters are members of the following category in UnicodeCategory: LowercaseLetter.