@magic-xpa/utils
Version:
magic utils package
45 lines (44 loc) • 2.84 kB
TypeScript
import { List, StringBuilder } from "@magic-xpa/mscorelib";
export declare const SEQ_2_HTML: number;
export declare const HTML_2_STR: number;
export declare const SEQ_2_STR: number;
export declare class StrUtil {
private static _paddingSpaces;
static mem_trim(str: string, len: number): number;
static memmove(dest: string, destCount: number, src: string, srcCount: number, len: number): string;
static memcpy(dest: string, destCount: number, src: string, scrCount: number, count: number): string;
static memcpy(dest: string[], destCount: number, src: string[], srcCount: number, count: number): void;
private static memcpy_0(dest, destCount, src, scrCount, count);
private static memcpy_1(dest, destCount, src, srcCount, count);
static memset(dest: string, destCount: number, inVal: string, counter: number): string;
static memset(dest: string[], destCount: number, inVal: string, counter: number): void;
private static memset_0(dest, destCount, inVal, counter);
private static memset_1(dest, destCount, inVal, counter);
static strstr(str: string, substr: string): string;
/*******************************/
static ReverseString(text: StringBuilder): StringBuilder;
static rtrim(str: string): string;
static rtrimWithNull(str: string, trimNullChars: boolean): string;
static ltrim(str: string): string;
static DeleteStringsFromEnds(str: string, strToDelete: string): string;
static padStr(str: string, len: number): string;
static tokenize(source: string, delim: string | RegExp): string[];
static stringToHexaDump(str: string, minLength: number): string;
static searchAndReplace(str: string, from: string, to: string): string;
static searchAndReplace(str: string, from: string[], to: string[]): string;
private static searchAndReplace_0(str, from, to);
private static searchAndReplace_1(str, from, to);
private static indexOf(str, strings, offset, SARindex);
static replaceStringTokens(userString: string, token: string, occurrence: number, val: string): string;
static makePrintableTokens(source: string, type: string): string;
static makePrintableTokens(source: string, type: number): string;
static makePrintableTokens(source: List<string>, type: number): string;
static makePrintableTokens_0(source: string, type: number): string;
private static makePrintableTokens_1(source, type);
static makePrintable(source: string): string;
static makePrintable2(source: string): string;
static ZstringMake(s: string, len: number): string;
static GetPlainTextfromRtf(rtfText: string): string;
static StringsArraysEqual(str1: string[], str2: string[]): boolean;
static SearchAndReplaceWildChars(buf: string, len: number, filler: string): string;
}