UNPKG

@adaptabletools/adaptable

Version:

Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

70 lines (69 loc) 3.62 kB
export declare function IsNull(stringToCheck: string | undefined): boolean; export declare function IsNotNull(stringToCheck: string | undefined): boolean; export declare function IsEmpty(stringToCheck: string | undefined): stringToCheck is ""; export declare function IsNotEmpty(stringToCheck: string | undefined): boolean; export declare function IsNullOrEmpty(stringToCheck: string | undefined): boolean; export declare function IsNotNullOrEmpty(stringToCheck: string | undefined): boolean; export declare function IsNullOrEmptyOrWhiteSpace(stringToCheck: string | undefined): boolean; export declare function IsNotNullOrEmptyOrWhiteSpace(stringToCheck: string | undefined): boolean; export declare function CamelCaseToHumanText(camelCase: string | undefined): string | null; export declare function RemoveTrailingComma(stringToCheck: string): string; export declare function ToLowerCase(stringToCheck: string): string; export declare function Includes(stringToCheck: string, valueToCheck: string): boolean; export declare function NotIncludes(stringToCheck: string, valueToCheck: string): boolean; export declare function AbbreviateString(stringToAbbreviate: string, maxLength: number): string; export declare function CapitaliseFirstLetter(str: string): string; export declare function Humanize(str: string): string; export declare function ReplaceEmptySpacesWithUnderscore(str?: string): string; export declare function IsNumeric(str: string): boolean; export declare function UnescapeHtmlEntities(str: string): string; export declare function ReplaceAllOccurencesExceptLastOne(str: string, searchTerm: string, replacement: string): string; /** * Splits a string into words: handles camelCase, PascalCase, UPPER_CASE, * UPPER_SNAKE_CASE, snake_case, kebab-case, spaces, and dot.notation. * Shared helper used by `kebabCase`, `startCase`, and `sentenceCase`. */ export declare function words(str: string): string[]; /** * Converts string to kebab-case. * Drop-in replacement for lodash/kebabCase. */ export declare function kebabCase(string: string): string; /** * Converts string to Start Case. * Drop-in replacement for lodash/startCase. */ export declare function startCase(string: string): string; /** * Converts string to Sentence case. * Splits on camelCase, PascalCase, dots, underscores, hyphens, and non-alphanumeric characters. * Drop-in replacement for the sentence-case package. */ export declare function sentenceCase(input: string): string; export declare const StringExtensions: { IsNull: typeof IsNull; IsNotNull: typeof IsNotNull; IsEmpty: typeof IsEmpty; IsNotEmpty: typeof IsNotEmpty; IsNullOrEmpty: typeof IsNullOrEmpty; IsNotNullOrEmpty: typeof IsNotNullOrEmpty; IsNullOrEmptyOrWhiteSpace: typeof IsNullOrEmptyOrWhiteSpace; IsNotNullOrEmptyOrWhiteSpace: typeof IsNotNullOrEmptyOrWhiteSpace; CamelCaseToHumanText: typeof CamelCaseToHumanText; RemoveTrailingComma: typeof RemoveTrailingComma; ToLowerCase: typeof ToLowerCase; Includes: typeof Includes; NotIncludes: typeof NotIncludes; AbbreviateString: typeof AbbreviateString; CapitaliseFirstLetter: typeof CapitaliseFirstLetter; Humanize: typeof Humanize; ReplaceEmptySpacesWithUnderscore: typeof ReplaceEmptySpacesWithUnderscore; IsNumeric: typeof IsNumeric; UnescapeHtmlEntities: typeof UnescapeHtmlEntities; ReplaceAllOccurencesExceptLastOne: typeof ReplaceAllOccurencesExceptLastOne; words: typeof words; kebabCase: typeof kebabCase; startCase: typeof startCase; sentenceCase: typeof sentenceCase; }; export default StringExtensions;