declare var plain_text_to_html: (text: string) => string; /** * @desc makes a valid */ declare var format_sentence: (str: string, rtl?: boolean, caseSense?: boolean) => string; declare var fill_string_template: (template_string: string, object: any, fabric: Function, delimiter: string, default_string: string, sloppy: boolean) => string; declare var make_string_template: (_template: string, _fabrics?: Object) => (object: { [key: string]: string; }) => string; declare var make_eml_header: (object: { [key: string]: string; }) => string; declare var make_eml_body: Object; declare module lib_string { /** * @author neuc,frac */ function empty(str: string): boolean; /** * @desc returns a unique string * @param {string} prefix an optional prefix for the generated string * @return {string} * @author fenris */ function generate(prefix?: string): string; /** * @desc splits a string, but returns an empty list, if the string is empty * @param {string} chain * @param {string} separator * @return {Array} * @author fenris */ function split(chain: string, separator?: string): Array; /** * @author neu3no */ function explode(str: string, needle: string, max: int): Array; /** * @desc concats a given word with itself n times * @param {string} word * @param {int} * @return {string} * @author fenris */ function repeat(word: string, count: int): string; /** * @desc lengthens a string by repeatedly appending or prepending another string * @param {string} word the string to pad * @param {int} length the length, which the result shall have * @param {string} symbol the string, which will be added (multiple times) * @param {boolean} [prepend]; whether to prepend (~true) or append (~false); default: false * @return {string} the padded string * @author fenris */ function pad(word: string, length: int, symbol?: string, mode?: string): string; /** * @desc checks if a given string conttains a certain substring * @param {string} string * @param {string} part * @return {boolean} * @author fenris */ function contains(chain: string, part: string): boolean; /** * @desc checks if a given string starts with a certain substring * @param {string} string * @param {string} part * @return {boolean} * @author fenris */ function startsWith(chain: string, part: string): boolean; /** * @desc checks if a given string ends with a certain substring * @param {string} string * @param {string} part * @return {boolean} * @author fenris */ function endsWith(chain: string, part: string): boolean; /** * @desc count the occourrences of a string in a string * @param string haystack_string the string wich should be examined * @param string needle_string the string which should be counted * @author neuc */ function count_occourrences(haystack_string: string, needle_string: string, check_escape: boolean): int; /** * @desc replaces occurences of "${name}" in a string by the corresponding values of an argument object * @author fenris */ function coin(str: string, args: { [id: string]: string; }): string; /** * @author fenris */ var stance: typeof coin; /** * @author fenris */ function cut(str: string, length: int, delimiter?: string): string; } declare module lib_string { /** * an implementation of c sprintf * @param {string} string format string * @param {array} args arguments which should be filled into * @returns {string} */ var sprintf: (input: string, args?: any[], original?: any) => string; /** * an implementation of c printf * @param {string} string format string * @param {array} args arguments which should be filled into * @returns {string} */ function printf(format: any, args: any): void; } declare var sprintf: (input: string, args?: any[], original?: any) => string; declare var printf: typeof lib_string.printf; declare var eml_log: any; declare var track_exports: any; declare var make_logger: (prefix: any, current_loglevel: any) => (obj: any, lvl: any) => void;