1 | interface StringJS {
|
2 | length: number;
|
3 |
|
4 | s: string;
|
5 |
|
6 | between(left: string, right?: string): StringJS;
|
7 |
|
8 | camelize(): StringJS;
|
9 |
|
10 | capitalize(): StringJS;
|
11 |
|
12 | chompLeft(prefix: string): StringJS;
|
13 |
|
14 | chompRight(suffix: string): StringJS;
|
15 |
|
16 | collapseWhitespace(): StringJS;
|
17 |
|
18 | contains(ss: string): boolean;
|
19 |
|
20 | count(substring: string): number;
|
21 |
|
22 | dasherize(): StringJS;
|
23 |
|
24 | decodeHTMLEntities(): StringJS;
|
25 |
|
26 | endsWith(ss: string): boolean;
|
27 |
|
28 | escapeHTML(): StringJS;
|
29 |
|
30 | ensureLeft(prefix: string): StringJS;
|
31 |
|
32 | ensureRight(suffix: string): StringJS;
|
33 |
|
34 | humanize(): StringJS;
|
35 |
|
36 | include(ss: string): boolean;
|
37 |
|
38 | isAlpha(): boolean;
|
39 |
|
40 | isAlphaNumeric(): boolean;
|
41 |
|
42 | isEmpty(): boolean;
|
43 |
|
44 | isLower(): boolean;
|
45 |
|
46 | isNumeric(): boolean;
|
47 |
|
48 | isUpper(): boolean;
|
49 |
|
50 | latinise(): StringJS;
|
51 |
|
52 | left(n: number): StringJS;
|
53 |
|
54 | lines(): string[];
|
55 |
|
56 | pad(len: number, char?: string | number): StringJS;
|
57 |
|
58 | padLeft(len: number, char?: string | number): StringJS;
|
59 |
|
60 | padRight(len: number, char?: string | number): StringJS;
|
61 |
|
62 | parseCSV(delimiter?: string, qualifier?: string, escape?: string, lineDelimiter?: string): string[];
|
63 |
|
64 | repeat(n: number): StringJS;
|
65 |
|
66 | replaceAll(ss: string, newStr: string): StringJS;
|
67 |
|
68 | strip(...strings: string[]): StringJS;
|
69 |
|
70 | stripLeft(...strings: string[]): StringJS;
|
71 |
|
72 | stripRight(...strings: string[]): StringJS;
|
73 |
|
74 | right(n: number): StringJS;
|
75 |
|
76 | setValue(string: any): StringJS;
|
77 |
|
78 | slugify(): StringJS;
|
79 |
|
80 | startsWith(prefix: string): boolean;
|
81 |
|
82 | stripPunctuation(): StringJS;
|
83 |
|
84 | stripTags(...tags: string[]): StringJS;
|
85 |
|
86 | template(values: Object, open?: string, close?: string): StringJS;
|
87 |
|
88 | times(n: number): StringJS;
|
89 |
|
90 | titleCase(): StringJS;
|
91 |
|
92 | toBoolean(): boolean;
|
93 |
|
94 | toCSV(delimiter?: string, qualifier?: string): StringJS;
|
95 | toCSV(options: {
|
96 | delimiter?: string | undefined;
|
97 | qualifier?: string | undefined;
|
98 | escape?: string | undefined;
|
99 | encloseNumbers?: boolean | undefined;
|
100 | keys?: boolean | undefined;
|
101 | }): StringJS;
|
102 |
|
103 | toFloat(precision?: number): number;
|
104 |
|
105 | toInt(): number;
|
106 |
|
107 | toInteger(): number;
|
108 |
|
109 | toString(): string;
|
110 |
|
111 | trim(): StringJS;
|
112 |
|
113 | trimLeft(): StringJS;
|
114 |
|
115 | trimRight(): StringJS;
|
116 |
|
117 | truncate(length: number, chars?: string): StringJS;
|
118 |
|
119 | underscore(): StringJS;
|
120 |
|
121 | unescapeHTML(): StringJS;
|
122 |
|
123 | wrapHTML(element?: string, attributes?: Object): StringJS;
|
124 | }
|
125 |
|
126 | declare var S: {
|
127 | (o: any): StringJS;
|
128 | VERSION: string;
|
129 | TMPL_OPEN: string;
|
130 | TMPL_CLOSE: string;
|
131 | };
|
132 |
|
133 | export = S;
|
134 | export as namespace S;
|