Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IsNumber() [2/2]

static bool System.Char.IsNumber ( string s,
int index )
inlinestatic

Definition at line 505 of file Char.cs.

506 {
507 if (s == null)
508 {
509 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
510 }
511 if ((uint)index >= (uint)s.Length)
512 {
513 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
514 }
515 char c = s[index];
516 if (IsLatin1(c))
517 {
518 if (IsAscii(c))
519 {
520 return IsInRange(c, '0', '9');
521 }
523 }
525 }
static UnicodeCategory GetUnicodeCategoryInternal(string value, int index)
static bool IsInRange(char c, char min, char max)
Definition Char.cs:191
static bool CheckNumber(UnicodeCategory uc)
Definition Char.cs:487
static bool IsLatin1(char c)
Definition Char.cs:69
static UnicodeCategory GetLatin1UnicodeCategory(char c)
Definition Char.cs:79
static bool IsAscii(char c)
Definition Char.cs:74

References System.Char.CheckNumber(), System.Char.GetLatin1UnicodeCategory(), System.Globalization.CharUnicodeInfo.GetUnicodeCategoryInternal(), System.index, System.Char.IsAscii(), System.Char.IsInRange(), System.Char.IsLatin1(), System.s, System.ThrowHelper.ThrowArgumentNullException(), and System.ThrowHelper.ThrowArgumentOutOfRangeException().