@obliczeniowo/elementary
Version:
Library made in Angular version 19
23 lines (22 loc) • 1.01 kB
TypeScript
export declare class TextTransform {
/**
* Split text only on space sign and if length of more then 1 word in one line is greater then maxLength
* @param text - text to split
* @param maxLength - max length of line
* @returns table of splitted text
*/
static splitByLengthAndWords(text: string, maxLength: number): string[];
/**
* Transform text `some text {to-replace-1}, by using other object {to-replace-2}` using object properties keys
* to replace in text by given properties object
* @param text - text with hidden {key} value
* @param properties - object properties
* @returns text with replaced by keys part, if key not exist in properties object then matching text is put there
*/
static prepare(text: string, properties: {
[key: string]: string;
}, prepareProps?: (key: string, properties: {
[key: string]: string;
}) => string | undefined): string;
static splitByMathOperator(text: string): string[];
}