synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
19 lines • 1.32 kB
TypeScript
/**
* Truncates a string to be a specified length, then optionally append a suffix.
*/
export declare function truncateString(str: string, maxLength: number, suffix?: string): string;
export declare function hex2ascii(inputString: string): string;
/**
* Returns a hash code from a string. Uses Java's String.hashCode() algorithm: https://devdocs.io/openjdk~8/java/lang/string#hashCode--
* @param {String} str The string to hash.
* @return {Number} A 32bit integer
* @see https://stackoverflow.com/a/8831937
*/
export declare function hashCode(str?: string | null): number;
export declare function normalizeNumericId(id: string | number): number;
export declare function validatePassword(newPassword: string): "A valid password must be at least 8 characters long" | "A valid password must include letters" | "A valid password must include digits (0-9)" | "A valid password must include special characters ~!@#$%^&*_-+=`|\\(){}[]:;\"'<>,.?/" | undefined;
export declare function copyStringToClipboard(value: string): Promise<void>;
export declare function replaceFileExtension(filePath: string, extension: string): string;
export declare function stringListToArray(input: string): string[];
export declare function splitAndTrim(value: string, sep?: string): string[];
//# sourceMappingURL=StringUtils.d.ts.map