@@ 176-189 (lines=14) @@ | ||
173 | } |
|
174 | return text.substr(idx); |
|
175 | }, |
|
176 | beforeCharRange: function(type, inclusive = true, startAt = 0, forward = true, returnAll = false){ |
|
177 | var text = this; |
|
178 | if (text == null) { return returnAll ? text : ''; } |
|
179 | if (forward) { |
|
180 | var idx = S.IndexOfCharRange(text, type, startAt); |
|
181 | }else { |
|
182 | idx = S.LastIndexOfCharRange(text, type); |
|
183 | } |
|
184 | if (idx == -1) { return returnAll ? text : ''; } |
|
185 | if (!inclusive) { |
|
186 | idx--; |
|
187 | } |
|
188 | return text.substr(0, idx); |
|
189 | }, |
|
190 | ||
191 | // digits |
|
192 | removeDigits: function(){ |
|
@@ 162-175 (lines=14) @@ | ||
159 | } |
|
160 | return output.join(""); |
|
161 | }, |
|
162 | afterCharRange: function(type, inclusive = true, startAt = 0, forward = true, returnAll = false){ |
|
163 | var text = this; |
|
164 | if (text == null) { return returnAll ? text : ''; } |
|
165 | if (!forward) { |
|
166 | var idx = S.LastIndexOfCharRange(text, type); |
|
167 | }else { |
|
168 | idx = S.IndexOfCharRange(text, type, startAt); |
|
169 | } |
|
170 | if (idx == -1) { return returnAll ? text : ''; } |
|
171 | if (!inclusive) { |
|
172 | idx++; |
|
173 | } |
|
174 | return text.substr(idx); |
|
175 | }, |
|
176 | beforeCharRange: function(type, inclusive = true, startAt = 0, forward = true, returnAll = false){ |
|
177 | var text = this; |
|
178 | if (text == null) { return returnAll ? text : ''; } |