Char.IsDigit 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
유니코드 문자가 10진수로 분류되는지 여부를 나타냅니다.
오버로드
| Name | Description |
|---|---|
| IsDigit(Char) |
지정된 유니코드 문자가 10진수로 분류되는지 여부를 나타냅니다. |
| IsDigit(String, Int32) |
지정된 문자열의 지정된 위치에 있는 문자가 소수 자릿수로 분류되는지 여부를 나타냅니다. |
예제
다음 코드 예제에서는 IsDigit.
using System;
public class IsDigitSample {
public static void Main() {
char ch = '8';
Console.WriteLine(Char.IsDigit(ch)); // Output: "True"
Console.WriteLine(Char.IsDigit("sample string", 7)); // Output: "False"
}
}
open System
let ch = '8'
printfn $"{Char.IsDigit ch}" // Output: "True"
printfn $"""{Char.IsDigit("sample string", 7)}""" // Output: "False"
Module IsDigitSample
Sub Main()
Dim ch8 As Char
ch8 = "8"c
Console.WriteLine(Char.IsDigit(ch8)) ' Output: "True"
Console.WriteLine(Char.IsDigit("sample string", 6)) ' Output: "False"
End Sub
End Module
설명
유효한 숫자는 범주의 멤버입니다 UnicodeCategory.DecimalDigitNumber .
IsDigit(Char)
- Source:
- Char.cs
- Source:
- Char.cs
- Source:
- Char.cs
- Source:
- Char.cs
- Source:
- Char.cs
지정된 유니코드 문자가 10진수로 분류되는지 여부를 나타냅니다.
public:
static bool IsDigit(char c);
public static bool IsDigit(char c);
static member IsDigit : char -> bool
Public Shared Function IsDigit (c As Char) As Boolean
매개 변수
- c
- Char
평가할 유니코드 문자입니다.
반품
true 10진수이면 c 10진수이고, false그렇지 않으면 .입니다.
설명
이 메서드는 radix-10 숫자인지 여부를 Char 결정합니다. 이는 숫자 유니코드 범주인지 여부를 결정하는
유효한 숫자는 범주의 멤버입니다 UnicodeCategory.DecimalDigitNumber .
추가 정보
적용 대상
IsDigit(String, Int32)
- Source:
- Char.cs
- Source:
- Char.cs
- Source:
- Char.cs
- Source:
- Char.cs
- Source:
- Char.cs
지정된 문자열의 지정된 위치에 있는 문자가 소수 자릿수로 분류되는지 여부를 나타냅니다.
public:
static bool IsDigit(System::String ^ s, int index);
public static bool IsDigit(string s, int index);
static member IsDigit : string * int -> bool
Public Shared Function IsDigit (s As String, index As Integer) As Boolean
매개 변수
- s
- String
문자열입니다.
- index
- Int32
에서 평가할 문자의 위치입니다.s
반품
true 위치에 index 있는 s 문자가 10진수이면 이고, false그렇지 않으면 .
예외
s은 null입니다.
index 가 0보다 작거나 .의 마지막 위치보다 큽니다 s.
설명
이 메서드는 radix-10 숫자인지 여부를 Char 결정합니다. 이는 숫자 유니코드 범주인지 여부를 결정하는
문자열의 문자 위치는 0부터 인덱싱됩니다.
유효한 숫자는 범주의 멤버입니다 UnicodeCategory.DecimalDigitNumber .