-
Notifications
You must be signed in to change notification settings - Fork 0
Char Extensions
This utility library provides extension methods for character operations, allowing you to perform various checks and transformations on characters.
Checks if a character is categorized as a control character.
using UtilityLibrary.Core;
char character = '\t';
bool isControl = character.IsControl();-
character(char): The character to check.
- bool:
trueif the character is a control character; otherwise,false.
Checks if a character is categorized as a decimal digit.
using UtilityLibrary.Core;
char character = '5';
bool isDigit = character.IsDigit();-
character(char): The character to check.
- bool:
trueif the character is a digit; otherwise,false.
Checks if a character is categorized as a high surrogate.
using UtilityLibrary.Core;
char character = '\uD800';
bool isHighSurrogate = character.IsHighSurrogate();-
character(char): The character to check.
- bool:
trueif the character is a high surrogate; otherwise,false.
Checks if a character is categorized as a low surrogate.
using UtilityLibrary.Core;
char character = '\uDC00';
bool isLowSurrogate = character.IsLowSurrogate();-
character(char): The character to check.
- bool:
trueif the character is a low surrogate; otherwise,false.
Checks if a character is categorized as a punctuation mark.
using UtilityLibrary.Core;
char character = '.';
bool isPunctuation = character.IsPunctuation();-
character(char): The character to check.
- bool:
trueif the character is a punctuation mark; otherwise,false.
Checks if a character is categorized as a letter.
using UtilityLibrary.Core;
char character = 'A';
bool isLetter = character.IsLetter();-
character(char): The character to check.
- bool:
trueif the character is a letter; otherwise,false.
Checks if a character is categorized as a letter or a decimal digit.
using UtilityLibrary.Core;
char character = 'A';
bool isLetterOrDigit = character.IsLetterOrDigit();-
character(char): The character to check.
- bool:
trueif the character is a letter or a digit; otherwise,false.
Checks if a character is categorized as a symbol.
using UtilityLibrary.Core;
char character = '$';
bool isSymbol = character.IsSymbol();-
character(char): The character to check.
- bool:
trueif the character is a symbol; otherwise,false.
Checks if a character is categorized as a separator character.
using UtilityLibrary.Core;
char character = ' ';
bool isSeparator = character.IsSeparator();-
character(char): The character to check.
- bool:
trueif the character is a separator character; otherwise,false.
Checks if a character is categorized as either a high or low surrogate.
using UtilityLibrary.Core;
char character = '\uD800';
bool isSurrogate = character.IsSurrogate();-
character(char): The character to check.
- bool:
trueif the character is a surrogate; otherwise,false.
Checks if a character is categorized as a lowercase letter.
using UtilityLibrary.Core;
char character = 'a';
bool isLower = character.IsLower();-
character(char): The character to check.
- bool:
trueif the character is a lowercase letter; otherwise,false.
Checks if a character is categorized as an uppercase letter.
using UtilityLibrary.Core;
char character = 'A';
bool isUpper = character.IsUpper();-
character(char): The character to check.
- bool:
trueif the character is an uppercase letter; otherwise,false.
Converts a character to its lowercase equivalent.
using UtilityLibrary.Core;
char character = 'A';
char lowercaseCharacter = character.ToLower();-
character(char): The character to convert.
- char: The lowercase equivalent of the input character.
Converts a character to its uppercase equivalent.
using UtilityLibrary.Core;
char character = 'a';
char uppercaseCharacter = character.ToUpper();-
character(char): The character to convert.
- char: The uppercase equivalent of the input character.
Checks if a character is categorized as white space.
using UtilityLibrary.Core;
char character = ' ';
bool isWhiteSpace = character.IsWhiteSpace();-
character(char): The character to check.
- bool:
trueif the character is white space; otherwise,false.