UNPKG

data-validator-js

Version:
32 lines (31 loc) 996 B
export default class StringUtilities { /** * Empty string */ static readonly EmptyString: string; /** * Is True string */ static IsTrue(value: string): boolean; /** * Whitespace */ static readonly WhiteSpace: RegExp; static readonly EnglishAndNumericCharacters: RegExp; /** * Checks string is null,undefined or empty. * @param str string for which we need to check. */ static IsNullOrEmpty(str: string | null | undefined): boolean; /** * Checks if the main string ends with the sub string * @param mainString The main string, in which sub string needs to be searched * @param subString The smaller string that is to be searched */ static EndsWithString(mainString: string, subString: string): boolean; /** * Checks if string contains only spaces, tabs or line breaks. * @param str string for which we need to check */ static IsBlankString(str: string): boolean; }