@sap-cloud-sdk/util
Version:
SAP Cloud SDK for JavaScript general utilities
31 lines (30 loc) • 1.08 kB
TypeScript
/**
* Encode a string to a base64 encoded string.
* @param str - String to encode.
* @returns Base64 encoded string.
*/
export declare function encodeBase64(str: string): string;
/**
* Remove whitespace from the left side of a string.
* @param string - String to trim.
* @returns String without whitespace on the left side.
*/
export declare function trimLeft(string: string): string;
/**
* Remove whitespace from the right side of a string.
* @param string - String to trim.
* @returns String without whitespace on the right side.
*/
export declare function trimRight(string: string): string;
/**
* Remove whitespace from the left and right side of a string.
* @param string - String to trim.
* @returns String without outer whitespace.
*/
export declare function trim(string: string): string;
/**
* Remove file extension from a string, e.g. remove 'test.jpg' would return 'test'.
* @param fileName - File name to remove the file extension from.
* @returns File name without extension.
*/
export declare function removeFileExtension(fileName: string): string;