/** * Shorthand static class for special string functions. */ export declare class LazyText { static letters: string[]; static digits: string[]; static variables: string[]; static controls: string[]; static whitespaces: string[]; static symbols: string[]; static punctuations: string[]; /** * A shorthand function to extract a certain number of character from a string. * @param {string} content The string where we want to extract content from. * @param {number} index The index from which we start. * @param {number} nbrLetters The number of letters to extract. * @returns {string} Return a string of nbrLetters characters if there is that many from a starting point. */ static extract(content: string, index: number, nbrLetters: number): string; /** * Extract the content from a string starting at a specific index until the predicate is false. * @param {string} content The source string from which we get the content to extract. * @param {number} startIndex The starting index. * @param {(c: string, i: number, txt: string)=>boolean} predicate A function to check if we include the character. * @returns {{lastIndex: number, value:string}} An object containing the substring made by following the predicate rule and the last index extracted. */ static extractFromUntil(content: string, startIndex: number, predicate: (c: string, i: number, txt: string) => boolean): { value: string; lastIndex: number; }; /** * Return the number of lines contained inside a string. * @param {string} content The string content from which we want to count the lines. * @returns {number} The number of lines contained in the string. */ static countLines(content: string): number; /** * Find the number of lines from the start of a string until a specified index, finding the character position of that element on the way. * @param {string} content The string we're going to look. * @param {number} maxIndex The last index we're going to look. * @returns {{lines: number; lineChar: number;}} An object containing the number of lines found and the character position of the last index in it's current line. */ static countLinesChar(content: string, maxIndex?: number): { lines: number; lineChar: number; }; } //# sourceMappingURL=lazyText.d.ts.map