Char.IsLower 方法

定義

指示 Unicode 字元是否分類為小寫字母。

多載

IsLower(Char)

指示指定的 Unicode 字元是否分類為小寫字母。

IsLower(String, Int32)

指示指定的字串中指定位置處的字元是否分類為小寫字母。

範例

下列程式碼範例示範 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"
    }
}
open System

let ch = 'a'

printfn $"{Char.IsLower ch}"                    // Output: "True"
printfn $"""{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)

Source:
Char.cs
Source:
Char.cs
Source:
Char.cs

指示指定的 Unicode 字元是否分類為小寫字母。

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 字元。

傳回

true 是小寫字母時為 c,否則為 false

備註

有效的小寫字母是 中 UnicodeCategory 下列類別的成員: LowercaseLetter

另請參閱

適用於

IsLower(String, Int32)

Source:
Char.cs
Source:
Char.cs
Source:
Char.cs

指示指定的字串中指定位置處的字元是否分類為小寫字母。

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

字串。

index
Int32

要評估的字元在 s 中的位置。

傳回

true 中位在 index 的字元是小寫字母時為 s,否則為 false

例外狀況

snull

index 小於零或大於 s 中的最後一個位置。

備註

字串中的字元位置是從零開始編制索引。

有效的小寫字母是 中 UnicodeCategory 下列類別的成員: LowercaseLetter

另請參閱

適用於