web-ui-pack
Version:
Web package with UI elements
20 lines (19 loc) • 1.15 kB
TypeScript
/** Returns if string has not-word symbol at pointed char position */
export declare function isSpecialSymbol(s: string, i: number): boolean;
/** Returns count of chars in lower case (for any language with ignoring numbers, symbols)
* @param s
* @param stopWith point to calc up to this value (for performance reason) */
export declare function stringLowerCount(s: string, stopWith?: number): number;
/** Returns count of chars in upper case (for any language with ignoring numbers)
* @param s
* @param stopWith point to calc up to this value (for performance reason) */
export declare function stringUpperCount(s: string, stopWith?: number): number;
/**
** Changes camelCase 'somePropValue' to 'Some Prop Value'
** Changes snake_case 'some_prop_value' to 'Some Prop Value'
** Changes kebab-case 'some-prop-value' to 'Some Prop Value';
*
* @param text The string to change
* @param capitalize Set uppercase 1st letter of every word: `somePropValue` => `Some Prop Value`; @defaultValue `true`
* @returns Prettified string */
export declare function stringPrettify(text: string, capitalize?: boolean, handleKebabCase?: boolean): string;