25
25
26
26
You can check the module import [ ` here ` ] ( ./modules.md ) .
27
27
28
- ####leftpad
28
+ #### leftpad
29
29
30
30
Returns a left-padded string.
31
31
@@ -43,8 +43,7 @@ import { LeftPadPipe } from 'angular-pipes/src/string/left-pad.pipe';
43
43
{{ 'aaa' | leftpad: 5: 'b' }} <!-- 'bbaaa' -->
44
44
```
45
45
46
-
47
- ####rightpad
46
+ #### rightpad
48
47
49
48
Returns a right-padded string.
50
49
@@ -62,7 +61,7 @@ import { RightPadPipe } from 'angular-pipes/src/string/right-pad.pipe';
62
61
{{ 'aaa' | rightpad: 5: 'b' }} <!-- 'aaabb' -->
63
62
```
64
63
65
- ####pad
64
+ #### pad
66
65
67
66
Returns a padded string. It starts with left and then right.
68
67
@@ -80,8 +79,7 @@ import { PadPipe } from 'angular-pipes/src/string/pad.pipe';
80
79
{{ 'aaa' | pad: 5: 'b' }} <!-- 'baaab' -->
81
80
```
82
81
83
-
84
- ####trim
82
+ #### trim
85
83
86
84
Trims the string.
87
85
@@ -99,8 +97,7 @@ import { TrimPipe } from 'angular-pipes/src/string/trim.pipe';
99
97
{{ ' aaa ' | trim }} <!-- 'aaa' -->
100
98
```
101
99
102
-
103
- ####split
100
+ #### split
104
101
105
102
Split a string into an array.
106
103
@@ -118,8 +115,7 @@ import { SplitPipe } from 'angular-pipes/src/string/split.pipe';
118
115
{{ 'ABABA' | split: 'B': 2 }} <!-- ['A', 'A'] -->
119
116
```
120
117
121
-
122
- ####replace
118
+ #### replace
123
119
124
120
This is the ` String#replace() ` function, if you want to know more about the arguments, check the official documentation.
125
121
@@ -129,8 +125,7 @@ This is the `String#replace()` function, if you want to know more about the argu
129
125
import { ReplacePipe } from ' angular-pipes/src/string/replace.pipe' ;
130
126
```
131
127
132
-
133
- ####match
128
+ #### match
134
129
135
130
This is the ` String#match() ` function, if you want to know more about the arguments, check the official documentation.
136
131
@@ -140,8 +135,7 @@ This is the `String#match()` function, if you want to know more about the argume
140
135
import { MatchPipe } from ' angular-pipes/src/string/match.pipe' ;
141
136
```
142
137
143
-
144
- ####test
138
+ #### test
145
139
146
140
This is the ` String#test() ` function, if you want to know more about the arguments, check the official documentation.
147
141
@@ -151,10 +145,9 @@ This is the `String#test()` function, if you want to know more about the argumen
151
145
import { TestPipe } from ' angular-pipes/src/string/test.pipe' ;
152
146
```
153
147
148
+ #### newlines
154
149
155
- ####newlines
156
-
157
- Replaces the ` \n ` , ` \r ` and ` \r\n ` into ` <br /> ` . This function returns HTML so you need to use it
150
+ Replaces the ` \n ` , ` \r ` and ` \r\n ` into ` <br /> ` . This function returns HTML so you need to use it
158
151
with the ` [innerHTML] ` binding.
159
152
160
153
##### File
@@ -163,7 +156,6 @@ with the `[innerHTML]` binding.
163
156
import { NewlinesPipe } from ' angular-pipes/src/string/newlines.pipe' ;
164
157
```
165
158
166
-
167
159
##### Usage
168
160
169
161
``` javascript
@@ -185,8 +177,7 @@ How are you ?
185
177
-->
186
178
```
187
179
188
-
189
- ####capitalize
180
+ #### capitalize
190
181
191
182
Capitalize the string. If the argument is true, all the words will be capitalized.
192
183
@@ -204,8 +195,7 @@ import { CapitalizePipe } from 'angular-pipes/src/string/capitalize.pipe';
204
195
{{ 'hELLo wOrld' | capitalize: true }} <!-- 'Hello World' -->
205
196
```
206
197
207
-
208
- ####upperfirst
198
+ #### upperfirst
209
199
210
200
Uppercase the first letter.
211
201
@@ -221,8 +211,7 @@ import { UpperFirstPipe } from 'angular-pipes/src/string/upperfirst.pipe';
221
211
{{ 'hello world' | upperfirst }} <!-- 'Hello world' -->
222
212
```
223
213
224
-
225
- ####template
214
+ #### template
226
215
227
216
Template string.
228
217
@@ -238,8 +227,7 @@ import { TemplatePipe } from 'angular-pipes/src/string/template.pipe';
238
227
{{ "Hello $1, it's $2" | template: 'world': 'me' }} <!-- 'Hello world, it's me' -->
239
228
```
240
229
241
-
242
- ####encodeuri
230
+ #### encodeuri
243
231
244
232
The encodeURI function.
245
233
@@ -249,8 +237,7 @@ The encodeURI function.
249
237
import { EncodeURIPipe } from ' angular-pipes/src/string/encode-uri.pipe' ;
250
238
```
251
239
252
-
253
- ####encodeuricomponent
240
+ #### encodeuricomponent
254
241
255
242
The encodeURIComponent function.
256
243
@@ -260,7 +247,7 @@ The encodeURIComponent function.
260
247
import { EncodeURIComponentPipe } from ' angular-pipes/src/string/encode-uri-component.pipe' ;
261
248
```
262
249
263
- ####repeat
250
+ #### repeat
264
251
265
252
Repeats a string.
266
253
@@ -277,11 +264,11 @@ import { RepeatPipe } from 'angular-pipes/src/string/repeat.pipe';
277
264
{{ 'a' | repeat: 2: 'b' }} <!-- 'aba' -->
278
265
```
279
266
280
- ####truncate
267
+ #### truncate
281
268
282
269
Truncate a string.
283
270
284
- Arguments: (size, suffix, preserve)
271
+ Arguments: \ ( size, suffix, preserve\ )
285
272
286
273
##### File
287
274
@@ -298,11 +285,11 @@ import { TruncatePipe } from 'angular-pipes/src/string/truncate.pipe';
298
285
{{ 'Hello World, how is it going?' | truncate: 14: '...', true }} <!-- 'Hello World, how...' -->
299
286
```
300
287
301
- ####slugify
288
+ #### slugify
302
289
303
290
Slugify a string.
304
291
305
- Arguments: (string)
292
+ Arguments: \ ( string\ )
306
293
307
294
##### File
308
295
@@ -316,13 +303,12 @@ import { SlugifyPipe } from 'angular-pipes/src/string/slugify.pipe';
316
303
{{ 'The zombie world war began' | slugify }} <!-- 'the-zombie-world-war-began' -->
317
304
```
318
305
319
- ####striptags
306
+ #### striptags
320
307
321
- strip out html tags from string
308
+ strip out html tags from string
322
309
** Important: this Pipe jobs it's not to replace innerHtml directive, it's only for tiny plain text**
323
310
324
-
325
- Arguments: ( string, ends, case-sensitive[ optional] )
311
+ Arguments: \( string, ends, case-sensitive\[ optional\] \)
326
312
327
313
##### File
328
314
@@ -338,7 +324,7 @@ var text = '<p class="paragraph">Lorem Ipsum is simply dummy text of the printin
338
324
<!-- result: Lorem Ipsum is simply dummy text of the printing... -->
339
325
```
340
326
341
- ####latinize
327
+ #### latinize
342
328
343
329
Remove accents/diacritics from a string
344
330
@@ -355,10 +341,11 @@ import { latinize } from 'angular-pipes/src/string/latinize.pipe';
355
341
<!-- result: Some strIng with Accents -->
356
342
```
357
343
358
- ####wrap
344
+ #### wrap
345
+
359
346
Wrap a string with another string
360
347
361
- Arguments: ( string, string, string[ optional] )
348
+ Arguments: \ ( string, string, string\ [ optional\] \ )
362
349
363
350
##### File
364
351
@@ -373,10 +360,11 @@ import { WrapPipe } from 'angular-pipes/src/string/wrap.pipe';
373
360
<p >{{ 'foo' | wrap: '{{': '}}' }}</p > <!-- result: {{foo}} -->
374
361
```
375
362
376
- ####with
363
+ #### with
364
+
377
365
With pipe check string has start and/or ends
378
366
379
- Arguments: ( string, start[ optional] , ends[ optional] , case-sensitive[ optional] )
367
+ Arguments: \ ( string, start\ [ optional\ ] , ends\ [ optional\ ] , case-sensitive\ [ optional\] \ )
380
368
381
369
##### File
382
370
@@ -402,7 +390,7 @@ import { WithPipe } from 'angular-pipes/src/string/with.pipe';
402
390
{{'The Flash Reverse' | with}} <!-- result: 'The Flash Reverse'-->
403
391
```
404
392
405
- ####reversestr
393
+ #### reversestr
406
394
407
395
Reverse a string.
408
396
@@ -417,3 +405,6 @@ import { ReverseStrPipe } from 'angular-pipes/src/string/reverse-str.pipe';
417
405
``` html
418
406
{{ 'hello world' | reverseStr }} <!-- 'dlrow olleh' -->
419
407
```
408
+
409
+
410
+
0 commit comments