/** * Defines an abstract class with character utilities. * * @since v1.4.1 */ export declare abstract class Chars { /** * Contains the backslash escape character '`\`'. * * @since v1.4.1 */ static readonly BACKSLASH: string; /** * Contains the backspace escape character '`\b`'. * * @since v1.4.1 */ static readonly BS: string; /** * Contains the carriage return escape character '`\r`'. * * @since v1.4.1 */ static readonly CR: string; /** * Contains the double quote escape character '`"`'. * * @since v1.4.1 */ static readonly DOUBLE_QUOTE: string; /** * Contains the form feed escape character '`\f`'. * * @since v1.4.1 */ static readonly FF: string; /** * Contains the horizontal tabulator escape character '`\t`'. * * @since v1.4.1 */ static readonly HT: string; /** * Contains the "new line" a. k. a. linefeed escape character '`\n`'. * * @since v1.4.1 */ static readonly LF: string; /** * Contains the null control character `'\0'`. * * @since v1.4.1 */ static NUL: string; /** * Contains the single quote escape character '`'`'. * * @since v1.4.1 */ static readonly SINGLE_QUOTE: string; /** * Contains a white space '` `'. * * @since v1.4.1 */ static readonly SPACE: string; /** * Contains the vertical tabulator escape character '`\v`'. * * @since v1.4.1 */ static readonly VT: string; /** * @constructor * * @private */ private constructor(); /** * Checks whether the specified character is alpha (a-z or A-Z). * * **Usage Examples:** * ```typescript * Chars.isAlpha('a'); // true * Chars.isAlpha('B'); // true * Chars.isAlpha('-'); // false * Chars.isAlpha('0'); // false * ``` * * @param {String} char Contains some character code. * @return {Boolean} whether the specified character is alpha (a-z or A-Z). * * @since v1.4.1 */ static isAlpha(char: string): boolean; /** * Checks whether the specified character is a lowercase letter (a-z). * * **Usage Examples:** * ```typescript * Chars.isAlphaLower('a'); // true * Chars.isAlphaLower('B'); // false * Chars.isAlphaLower('-'); // false * Chars.isAlphaLower('0'); // false * Chars.isAlphaLower('f'); // true * ``` * * @param {String} char Contains some character code. * @return {Boolean} whether the specified character is a lowercase letter * (a-z). * * @since v1.4.1 */ static isAlphaLower(char: string): boolean; /** * Checks whether the specified character is an uppercase letter (A-Z). * * **Usage Examples:** * ```typescript * Chars.isAlphaLower('a'); // true * Chars.isAlphaLower('B'); // false * Chars.isAlphaLower('-'); // false * Chars.isAlphaLower('0'); // false * Chars.isAlphaLower('f'); // true * ``` * * @param {String} char Contains some character code. * @return {Boolean} whether the specified character is an uppercase letter * (a-z). * * @since v1.4.1 */ static isAlphaUpper(char: string): boolean; /** * Checks whether the specified character is an Arabic digit. * * **Usage Examples:** * ```typescript * Chars.isArabicDigit('\u0660'); // true * Chars.isArabicDigit('\u0661'); // true * Chars.isArabicDigit('\u0667'); // true * Chars.isArabicDigit('\u0668'); // true * Chars.isArabicDigit('\u0669'); // true * Chars.isArabicDigit('0'); // false * Chars.isArabicDigit('6'); // false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is an Arabic digit. * * @since v1.4.2 */ static isArabicDigit(char: string): boolean; /** * Checks whether the specified character is [ASCII](https://www.ascii-code.com/). * * **Usage Examples:** * ```typescript * Chars.isASCII('a'); // true * Chars.isASCII('f'); // true * Chars.isASCII('B'); // true * Chars.isASCII('-'); // true * Chars.isASCII('0'); // true * Chars.isASCII('{'); // true * Chars.isASCII('|'); // true * Chars.isASCII('ä'); // false * Chars.isASCII('Ö'); // false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is * [ASCII](https://www.ascii-code.com/). * * @since v1.4.1 */ static isASCII(char: string): boolean; /** * Checks whether the specified character is an ASCII control character. * * **Usage Examples:** * ```typescript * Chars.isASCIIControl(Chars.NUL); // true * Chars.isASCIIControl(Chars.BS); // true * Chars.isASCIIControl(Chars.CR); // true * Chars.isASCIIControl(Chars.FF); // true * Chars.isASCIIControl(Chars.HT); // true * Chars.isASCIIControl(Chars.LF); // true * Chars.isASCIIControl(Chars.VT); // true * Chars.isASCIIControl('0'); // false * Chars.isASCIIControl('a'); // false * Chars.isASCIIControl('B'); // false * Chars.isASCIIControl('z'); // false * Chars.isASCIIControl('ä'); // false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is an ASCII control * character. * * @since v1.4.1 */ static isASCIIControl(char: string): boolean; /** * Checks whether the specified character is a printable character. * * **Usage Examples:** * ```typescript * Chars.isASCIIPrintable('0'); // true * Chars.isASCIIPrintable('a'); // true * Chars.isASCIIPrintable('B'); // true * Chars.isASCIIPrintable('z'); // true * Chars.isASCIIPrintable('`'); // true * Chars.isASCIIPrintable('ä'); // false * Chars.isASCIIPrintable('Ö'); // false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is a printable character. * * @since v1.4.1 */ static isASCIIPrintable(char: string): boolean; /** * Checks whether the specified character is a digit. * * **Usage Examples:** * ```typescript * Chars.isDigit(''); // false * Chars.isDigit('3'); // true * Chars.isDigit('\u0660'); // true * Chars.isDigit('\u0967'); // true * Chars.isDigit('\u06f4'); // true * Chars.isDigit('\u2175'); // true * Chars.isDigit('\u216F'); // true * Chars.isDigit('a'); // false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is a digit. * * @since v1.4.1 */ static isDigit(char: string): boolean; /** * Checks whether the specified character is high surrogate. A high * surrogate character is a 16-bit code character between `U+D800` * and `U+DBFF`. * * **Usage Examples:** * ```typescript * Chars.isHighSurrogate(''); // false * Chars.isHighSurrogate('😀'); // true * Chars.isHighSurrogate('😎'); // true * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is high surrogate. * * @since v1.4.1 */ static isHighSurrogate(char: string): boolean; /** * Checks whether the specified character is a Hindu digit. * * **Usage Examples:** * ```typescript * Chars.isHinduDigit(''); // true * Chars.isHinduDigit('0'); // true * Chars.isHinduDigit('१'); // true * Chars.isHindiDigit('२'); // true * Chars.isHinduDigit('\u0967'); // true * Chars.isHinduDigit('\u0968'); // true * Chars.isHinduDigit('\u0969'); // true * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is a Hindu digit. * * @since v1.4.2 */ static isHinduDigit(char: string): boolean; /** * Checks whether the specified character is a letter. * * **Usage Examples:** * ```typescript * Chars.isLetter('c'); // true * Chars.isLetter('Ā'); // true * Chars.isLetter('ה'); // true * Chars.isLetter('ت'); // true * Chars.isLetter('δ'); // true * Chars.isLetter('ю'); // true * Chars.isLetter('Ö'); // true * Chars.isLetter('ぃ'); // true * Chars.isLetter('`'); // false * Chars.isLetter('°'); // false * Chars.isLetter('©'); // false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is a letter. * * @since v1.4.1 */ static isLetter(char: string): boolean; /** * Checks whether the specified character is either letter or digit. * * **Usage Examples:** * ```typescript * Chars.isLetterOrDigit('c'); // true * Chars.isLetterOrDigit('Ā'); // true * Chars.isLetterOrDigit('ה'); // true * Chars.isLetterOrDigit('ت'); // true * Chars.isLetterOrDigit('δ'); // true * Chars.isLetterOrDigit('ю'); // true * Chars.isLetterOrDigit('Ö'); // true * Chars.isLetterOrDigit('ぃ'); // true * Chars.isLetterOrDigit('3'); // true * Chars.isLetterOrDigit('\u0660'); // true * Chars.isLetterOrDigit('\u0967'); // true * Chars.isLetterOrDigit('\u06f4'); // true * Chars.isLetterOrDigit('\u2175'); // true * Chars.isLetterOrDigit('\u216F'); // true * Chars.isLetterOrDigit('a'); // false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is either letter * or digit. * * @since v1.4.3 */ static isLetterOrDigit(char: string): boolean; /** * Checks whether the specified character is lowercase. * * **Usage Examples:** * ```typescript * Chars.isLowerCase(''); // false * Chars.isLowerCase('abc'); // false * Chars.isLowerCase('a'); // true * Chars.isLowerCase('Б'); // false * Chars.isLowerCase('ö'); // true * Chars.isLowerCase('Ü'); // false * Chars.isLowerCase('ы'); // true * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is lowercase. * * @since v1.4.1 */ static isLowerCase(char: string): boolean; /** * Checks whether the specified character is an upper Roman numberal. * * **Usage Examples:** * ```typescript * Chars.isLowerRomanDigit(''); false * Chars.isLowerRomanDigit('ⅳ'); true * Chars.isLowerRomanDigit('\u2171'); true * Chars.isLowerRomanDigit('\u2179'); true * Chars.isLowerRomanDigit('\u217C'); true * Chars.isLowerRomanDigit('\u217F'); true * Chars.isLowerRomanDigit('a'); false * Chars.isLowerRomanDigit('0'); false * Chars.isLowerRomanDigit('9'); false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is an upper Roman * numberal. * * @since v1.4.2 */ static isLowerRomanDigit(char: string): boolean; /** * Checks whether the specified character is low surrogate. A low * surrogate character is a 16-bit code character between `U+D800` * and `U+DBFF`. * * **Usage Examples:** * ```typescript * Chars.isLowSurrogate(''); // false * Chars.isLowSurrogate('\uDC00'); // true * Chars.isLowSurrogate('\uDFFF'); // true * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is low surrogate. * * @since v1.4.1 */ static isLowSurrogate(char: string): boolean; /** * Checks whether the specified character is a modern digit. * * **Usage Examples:** * ```typescript * Chars.isModernDigit('0'); // true * Chars.isModernDigit('3'); // true * Chars.isModernDigit('9'); // true * Chars.isModernDigit('B'); // false * Chars.isModernDigit('z'); // false * Chars.isModernDigit('`'); // false * Chars.isModernDigit('ä'); // false * Chars.isModernDigit('Ö'); // false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is a modern digit. * * @since v1.4.2 */ static isModernDigit(char: string): boolean; /** * Checks whether the specified character is a Persian digit. * * **Usage Examples:** * ```typescript * Chars.isPersianDigit('۰'); // true * Chars.isPersianDigit('۱'); // true * Chars.isPersianDigit('۲'); // true * Chars.isPersianDigit('۳'); // true * Chars.isPersianDigit('۴'); // true * Chars.isPersianDigit('۵'); // true * Chars.isPersianDigit('۶'); // true * Chars.isPersianDigit('۷'); // true * Chars.isPersianDigit('۸'); // true * Chars.isPersianDigit('۹'); // true * Chars.isPersianDigit('9'); // false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is a Persian digit. * * @since v1.4.2 */ static isPersianDigit(char: string): boolean; /** * Checks whether the specified character is a space character. * * **Usage Examples:** * ```typescript * Chars.isSpace(' '); // true * Chars.isSpace('_'); // false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is a space character. * * @since v1.4.3 */ static isSpace(char: string): boolean; /** * Checks whether the specified character is surrogate (high or low * surrogate). * * **Usage Examples:** * ```typescript * Chars.isSurrogate(' '); // false * Chars.isSurrogate('\uD800'); // true * Chars.isSurrogate('\uDC00'); // true * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is surrogate. * * @since v1.4.3 */ static isSurrogate(char: string): boolean; /** * Checks whether the specified characters create a surrogate pair. A * surrogate pair according to the [Unicode Standard](https://unicode.org/standard/standard.html) * is a combination of a Unicode code point from U+D800 to U+DBFF a. k. * a. "high surrogate" with another in range from U+DC00 to U+DFFF a. k. * a. "low surrogate". * * **Usage Examples:** * ```typescript * Chars.isSurrogatePair('', ''); // false * Chars.isSurrogatePair('\ud801', '\udc9f'); // true * Chars.isSurrogatePair('\ud801\udbff', '\udc9f'); // false * ``` * * @param {String} high Contains some character. * @param {String} low Contains some other character. * @return {Boolean} whether the specified characters create a surrogate * pair. * * @since v1.4.3 */ static isSurrogatePair(high: string, low: string): boolean; /** * Checks whether the specified character is an upper Roman numberal. * * **Usage Examples:** * ```typescript * Chars.isUpperRomanDigit(''); false * Chars.isUpperRomanDigit('\u2160'); true * Chars.isUpperRomanDigit('\u2161'); true * Chars.isUpperRomanDigit('\u2169'); true * Chars.isUpperRomanDigit('\u216A'); true * Chars.isUpperRomanDigit('\u216B'); true * Chars.isUpperRomanDigit('\u216C'); true * Chars.isUpperRomanDigit('\u216F'); true * Chars.isUpperRomanDigit('a'); false * Chars.isUpperRomanDigit('0'); false * Chars.isUpperRomanDigit('9'); false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is an upper Roman * numberal. * * @since v1.4.2 */ static isUpperRomanDigit(char: string): boolean; /** * Checks whether the specified character is uppercase. * * **Usage Examples:** * ```typescript * Chars.isUpperCase(''); // false * Chars.isUpperCase('abc'); // false * Chars.isUpperCase('a'); // false * Chars.isUpperCase('Б'); // true * Chars.isUpperCase('ö'); // false * Chars.isUpperCase('Ü'); // true * Chars.isUpperCase('ы'); // false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is uppercase. * * @since v1.4.1 */ static isUpperCase(char: string): boolean; /** * Checks whether the specified character is a space i. e. `" "`, * `"\t"`, `"\r"`, `"\n"`, `"\f"`. * * **Usage Examples:** * ```typescript * Chars.isWhitespace(""); // false * Chars.isWhitespace(" "); // true * Chars.isWhitespace("\t"); // true * Chars.isWhitespace("\r"); // true * Chars.isWhitespace("\f"); // true * Chars.isWhitespace("\n"); // true * Chars.isWhitespace("\n\n"); // false * Chars.isWhitespace("a"); // false * ``` * * @param {String} char Contains some character. * @return {Boolean} whether the specified character is a space. * * @since v1.4.1 */ static isWhitespace(char: string): boolean; }