Char.IsLower Method

Definition

指示 Unicode 字符是否属于小写字母类别。Indicates whether a Unicode character is categorized as a lowercase letter.

Overloads

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(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

Parameters

c
Char

要计算的 Unicode 字符。The Unicode character to evaluate.

Returns

Boolean

如果 true 是一个小写字母,则为 c;否则为 falsetrue if c is a lowercase letter; otherwise, false.

Examples

下面的代码示例演示 IsLowerThe 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

Remarks

有效的小写字母是 UnicodeCategoryLowercaseLetter中以下类别的成员。Valid lowercase letters are members of the following category in UnicodeCategory: LowercaseLetter.

See also

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

Parameters

s
String

一个字符串。A string.

index
Int32

s 中要计算的字符的位置。The position of the character to evaluate in s.

Returns

Boolean

如果 true 中位于 index 的字符是一个小写字母,则为 s;否则为 falsetrue if the character at position index in s is a lowercase letter; otherwise, false.

Exceptions

snulls is null.

index 小于零或大于 s 中最后一个位置。index is less than zero or greater than the last position in s.

Examples

下面的代码示例演示 IsLowerThe 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

Remarks

字符串中的字符位置从零开始索引。Character positions in a string are indexed starting from zero.

有效的小写字母是 UnicodeCategoryLowercaseLetter中以下类别的成员。Valid lowercase letters are members of the following category in UnicodeCategory: LowercaseLetter.

See also

Applies to