@sankhyalabs/core-docs 5.15.5 → 5.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/classes/ApplicationContext.md +31 -32
- package/classes/ArrayUtils.md +183 -41
- package/classes/AuthorizedServiceCaller.md +25 -34
- package/classes/Change.md +59 -74
- package/classes/DataUnit.md +970 -1068
- package/classes/DataUnitAction.md +25 -42
- package/classes/DataUnitStorage.md +40 -43
- package/classes/DateUtils.md +133 -126
- package/classes/ElementIDUtils.md +123 -122
- package/classes/ErrorException.md +67 -88
- package/classes/ErrorTracking.md +20 -23
- package/classes/FieldComparator.md +35 -39
- package/classes/FloatingManager.md +195 -198
- package/classes/HTMLBuilder.md +14 -20
- package/classes/HttpProvider.md +45 -41
- package/classes/IDBRepository.md +179 -196
- package/classes/JSUtils.md +82 -58
- package/classes/KeyboardManager.md +95 -87
- package/classes/{MaskFormatter-1.md → MaskFormatter.md} +81 -120
- package/classes/NumberUtils.md +163 -152
- package/classes/ObjectUtils.md +82 -61
- package/classes/OnboardingUtils.md +36 -51
- package/classes/OverflowWatcher.md +269 -0
- package/classes/PromiseSync.md +25 -42
- package/classes/ReadyUtil.md +31 -41
- package/classes/RequestMetadata.md +29 -30
- package/classes/SearchUtils.md +41 -0
- package/classes/SelectionInfo.md +59 -74
- package/classes/SkwHttpProvider.md +33 -45
- package/classes/StringUtils.md +397 -268
- package/classes/TimeFormatter.md +43 -44
- package/classes/UserAgentUtils.md +17 -20
- package/classes/VersionUtils.md +15 -18
- package/classes/WaitingChangeException.md +63 -84
- package/classes/WarningException.md +67 -88
- package/enumerations/Action.md +297 -0
- package/enumerations/ChangeOperation.md +47 -0
- package/enumerations/DataType.md +57 -0
- package/enumerations/DependencyType.md +37 -0
- package/enumerations/OverflowDirection.md +29 -0
- package/enumerations/SelectionMode.md +27 -0
- package/enumerations/SortMode.md +27 -0
- package/enumerations/UserInterface.md +177 -0
- package/functions/defaultDataLoader.md +25 -0
- package/{modules.md → globals.md} +22 -37
- package/interfaces/ChildDescriptor.md +12 -16
- package/interfaces/ChildLink.md +9 -12
- package/interfaces/DUActionInterceptor.md +10 -14
- package/interfaces/ExecutionContext.md +17 -32
- package/interfaces/FieldDescriptor.md +52 -66
- package/interfaces/Filter.md +13 -17
- package/interfaces/IElementIDInfo.md +11 -14
- package/interfaces/ILoadResult.md +11 -16
- package/interfaces/IRepository.md +88 -93
- package/interfaces/IRepositoryIndex.md +23 -30
- package/interfaces/LoadDataRequest.md +36 -45
- package/interfaces/LoadDataResponse.md +11 -14
- package/interfaces/PageRequest.md +16 -20
- package/interfaces/PaginationInfo.md +24 -31
- package/interfaces/PromiseSyncCallback.md +13 -17
- package/interfaces/QuickFilter.md +17 -21
- package/interfaces/Record.md +26 -33
- package/interfaces/SavedRecord.md +33 -41
- package/interfaces/Sort.md +12 -16
- package/interfaces/SortingProvider.md +10 -13
- package/interfaces/UnitMetadata.md +16 -21
- package/interfaces/WaitingChange.md +16 -20
- package/namespaces/MaskFormatter/README.md +17 -0
- package/namespaces/MaskFormatter/type-aliases/MaskCharacter.md +13 -0
- package/namespaces/MaskFormatter/variables/MaskCharacter.md +13 -0
- package/package.json +1 -1
- package/type-aliases/OnOverflowCallBack.md +25 -0
- package/enums/Action.md +0 -327
- package/enums/ChangeOperation.md +0 -52
- package/enums/DataType.md +0 -63
- package/enums/DependencyType.md +0 -41
- package/enums/SelectionMode.md +0 -30
- package/enums/SortMode.md +0 -30
- package/enums/UserInterface.md +0 -195
- package/modules/MaskFormatter.md +0 -37
package/classes/StringUtils.md
CHANGED
@@ -1,61 +1,40 @@
|
|
1
|
-
[
|
1
|
+
[**@sankhyalabs/core**](../README.md) • **Docs**
|
2
|
+
|
3
|
+
***
|
4
|
+
|
5
|
+
[@sankhyalabs/core](../globals.md) / StringUtils
|
2
6
|
|
3
7
|
# Class: StringUtils
|
4
8
|
|
5
9
|
`StringUtils`: Utilizado para manipulação de Strings.
|
6
10
|
|
7
|
-
## Table of contents
|
8
|
-
|
9
|
-
### Constructors
|
10
|
-
|
11
|
-
- [constructor](StringUtils.md#constructor)
|
12
|
-
|
13
|
-
### Methods
|
14
|
-
|
15
|
-
- [compare](StringUtils.md#compare)
|
16
|
-
- [decodeHtmlEntities](StringUtils.md#decodehtmlentities)
|
17
|
-
- [formatBytes](StringUtils.md#formatbytes)
|
18
|
-
- [generateUUID](StringUtils.md#generateuuid)
|
19
|
-
- [getBooleanValue](StringUtils.md#getbooleanvalue)
|
20
|
-
- [getOppositeCase](StringUtils.md#getoppositecase)
|
21
|
-
- [hashCode](StringUtils.md#hashcode)
|
22
|
-
- [isCaseable](StringUtils.md#iscaseable)
|
23
|
-
- [isEmpty](StringUtils.md#isempty)
|
24
|
-
- [isLowerCase](StringUtils.md#islowercase)
|
25
|
-
- [isString](StringUtils.md#isstring)
|
26
|
-
- [padEnd](StringUtils.md#padend)
|
27
|
-
- [padStart](StringUtils.md#padstart)
|
28
|
-
- [prettyPrecision](StringUtils.md#prettyprecision)
|
29
|
-
- [replaceAccentuatedChars](StringUtils.md#replaceaccentuatedchars)
|
30
|
-
- [replaceAccentuatedCharsKeepSymbols](StringUtils.md#replaceaccentuatedcharskeepsymbols)
|
31
|
-
- [replaceAccentuatedCharsLower](StringUtils.md#replaceaccentuatedcharslower)
|
32
|
-
- [replaceAccentuatedCharsUpper](StringUtils.md#replaceaccentuatedcharsupper)
|
33
|
-
- [replaceBlankCharacters](StringUtils.md#replaceblankcharacters)
|
34
|
-
- [toCamelCase](StringUtils.md#tocamelcase)
|
35
|
-
- [toKebabCase](StringUtils.md#tokebabcase)
|
36
|
-
- [toPascalCase](StringUtils.md#topascalcase)
|
37
|
-
- [toSnakeCase](StringUtils.md#tosnakecase)
|
38
|
-
|
39
11
|
## Constructors
|
40
12
|
|
41
|
-
###
|
13
|
+
### new StringUtils()
|
42
14
|
|
43
|
-
|
15
|
+
> **new StringUtils**(): [`StringUtils`](StringUtils.md)
|
16
|
+
|
17
|
+
#### Returns
|
18
|
+
|
19
|
+
[`StringUtils`](StringUtils.md)
|
44
20
|
|
45
21
|
## Methods
|
46
22
|
|
47
|
-
### compare
|
23
|
+
### compare()
|
48
24
|
|
49
|
-
|
25
|
+
> `static` **compare**(`a`, `b`): `number`
|
50
26
|
|
51
27
|
Determina a ordem de strings.
|
52
28
|
|
53
29
|
#### Parameters
|
54
30
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
31
|
+
• **a**: `string`
|
32
|
+
|
33
|
+
Primeira string para comparação.
|
34
|
+
|
35
|
+
• **b**: `string`
|
36
|
+
|
37
|
+
Segunda string para comparação.
|
59
38
|
|
60
39
|
#### Returns
|
61
40
|
|
@@ -63,52 +42,50 @@ Determina a ordem de strings.
|
|
63
42
|
|
64
43
|
- Um numeral negativo se o primeiro argumento é menor que o segundo, zero se os dois são iguais e um numeral positivo quando o primeiro é maior que o segundo.
|
65
44
|
|
66
|
-
####
|
45
|
+
#### Source
|
67
46
|
|
68
|
-
src/utils/StringUtils.ts:
|
47
|
+
src/utils/StringUtils.ts:250
|
69
48
|
|
70
|
-
|
49
|
+
***
|
71
50
|
|
72
|
-
### decodeHtmlEntities
|
51
|
+
### decodeHtmlEntities()
|
73
52
|
|
74
|
-
|
53
|
+
> `static` **decodeHtmlEntities**(`text`): `string`
|
75
54
|
|
76
55
|
Converte todas as entidades HTML de um texto
|
77
56
|
|
78
|
-
**`Example`**
|
79
|
-
|
80
|
-
```ts
|
81
|
-
entrada: "<Teste>" // retorno: "<Teste>"
|
82
|
-
```
|
83
|
-
|
84
57
|
#### Parameters
|
85
58
|
|
86
|
-
|
87
|
-
|
88
|
-
|
59
|
+
• **text**: `string`
|
60
|
+
|
61
|
+
String para ser transformada.
|
89
62
|
|
90
63
|
#### Returns
|
91
64
|
|
92
65
|
`string`
|
93
66
|
|
94
|
-
####
|
67
|
+
#### Example
|
68
|
+
|
69
|
+
```ts
|
70
|
+
entrada: "<Teste>" // retorno: "<Teste>"
|
71
|
+
```
|
72
|
+
|
73
|
+
#### Source
|
95
74
|
|
96
|
-
src/utils/StringUtils.ts:
|
75
|
+
src/utils/StringUtils.ts:71
|
97
76
|
|
98
|
-
|
77
|
+
***
|
99
78
|
|
100
|
-
### formatBytes
|
79
|
+
### formatBytes()
|
101
80
|
|
102
|
-
|
81
|
+
> `static` **formatBytes**(`bytes`): `string`
|
103
82
|
|
104
83
|
Utilitário para formatar bytes em string legível, convertendo para
|
105
84
|
múltiplos maiores caso necessário.
|
106
85
|
|
107
86
|
#### Parameters
|
108
87
|
|
109
|
-
|
110
|
-
| :------ | :------ |
|
111
|
-
| `bytes` | `number` |
|
88
|
+
• **bytes**: `number`
|
112
89
|
|
113
90
|
#### Returns
|
114
91
|
|
@@ -116,15 +93,15 @@ múltiplos maiores caso necessário.
|
|
116
93
|
|
117
94
|
string formatada de acordo com a unidade.
|
118
95
|
|
119
|
-
####
|
96
|
+
#### Source
|
120
97
|
|
121
|
-
src/utils/StringUtils.ts:
|
98
|
+
src/utils/StringUtils.ts:335
|
122
99
|
|
123
|
-
|
100
|
+
***
|
124
101
|
|
125
|
-
### generateUUID
|
102
|
+
### generateUUID()
|
126
103
|
|
127
|
-
|
104
|
+
> `static` **generateUUID**(): `string`
|
128
105
|
|
129
106
|
Método utilizado para gerar IDs únicos.
|
130
107
|
|
@@ -134,31 +111,45 @@ Método utilizado para gerar IDs únicos.
|
|
134
111
|
|
135
112
|
id único randômico.
|
136
113
|
|
137
|
-
####
|
114
|
+
#### Source
|
138
115
|
|
139
|
-
src/utils/StringUtils.ts:
|
116
|
+
src/utils/StringUtils.ts:381
|
140
117
|
|
141
|
-
|
118
|
+
***
|
142
119
|
|
143
|
-
###
|
120
|
+
### getArgumentNumber()
|
144
121
|
|
145
|
-
|
122
|
+
> `static` **getArgumentNumber**(`argument`): `number`
|
146
123
|
|
147
|
-
|
124
|
+
#### Parameters
|
148
125
|
|
149
|
-
|
126
|
+
• **argument**: `String`
|
150
127
|
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
128
|
+
#### Returns
|
129
|
+
|
130
|
+
`number`
|
131
|
+
|
132
|
+
#### Source
|
133
|
+
|
134
|
+
src/utils/StringUtils.ts:485
|
135
|
+
|
136
|
+
***
|
137
|
+
|
138
|
+
### getBooleanValue()
|
139
|
+
|
140
|
+
> `static` **getBooleanValue**(`value`, `defaultValue`): `boolean`
|
141
|
+
|
142
|
+
Converte um texto do tipo string para um booleano.
|
155
143
|
|
156
144
|
#### Parameters
|
157
145
|
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
146
|
+
• **value**: `string`
|
147
|
+
|
148
|
+
Valor a ser convertido.
|
149
|
+
|
150
|
+
• **defaultValue**: `boolean`= `false`
|
151
|
+
|
152
|
+
Valor padrão.
|
162
153
|
|
163
154
|
#### Returns
|
164
155
|
|
@@ -166,23 +157,30 @@ Informado: 'false' | Retorna: false
|
|
166
157
|
|
167
158
|
- Texto convertido.
|
168
159
|
|
169
|
-
####
|
160
|
+
#### Example
|
161
|
+
|
162
|
+
```ts
|
163
|
+
Informado: 'true' | Retorna: true
|
164
|
+
Informado: 'false' | Retorna: false
|
165
|
+
```
|
166
|
+
|
167
|
+
#### Source
|
170
168
|
|
171
|
-
src/utils/StringUtils.ts:
|
169
|
+
src/utils/StringUtils.ts:180
|
172
170
|
|
173
|
-
|
171
|
+
***
|
174
172
|
|
175
|
-
### getOppositeCase
|
173
|
+
### getOppositeCase()
|
176
174
|
|
177
|
-
|
175
|
+
> `static` **getOppositeCase**(`original`): `string`
|
178
176
|
|
179
177
|
Inverte uma string de minúsculas para maiúsculas e vice-versa
|
180
178
|
|
181
179
|
#### Parameters
|
182
180
|
|
183
|
-
|
184
|
-
|
185
|
-
|
181
|
+
• **original**: `string`
|
182
|
+
|
183
|
+
A string a ser invertida
|
186
184
|
|
187
185
|
#### Returns
|
188
186
|
|
@@ -190,53 +188,97 @@ Inverte uma string de minúsculas para maiúsculas e vice-versa
|
|
190
188
|
|
191
189
|
A string invertida
|
192
190
|
|
193
|
-
####
|
191
|
+
#### Source
|
192
|
+
|
193
|
+
src/utils/StringUtils.ts:416
|
194
194
|
|
195
|
-
|
195
|
+
***
|
196
196
|
|
197
|
-
|
197
|
+
### getSpecialCharacters()
|
198
198
|
|
199
|
-
|
199
|
+
> `static` **getSpecialCharacters**(`str`): `string`[]
|
200
200
|
|
201
|
-
|
201
|
+
#### Parameters
|
202
|
+
|
203
|
+
• **str**: `string`
|
204
|
+
|
205
|
+
#### Returns
|
206
|
+
|
207
|
+
`string`[]
|
208
|
+
|
209
|
+
#### Source
|
210
|
+
|
211
|
+
src/utils/StringUtils.ts:457
|
212
|
+
|
213
|
+
***
|
214
|
+
|
215
|
+
### hashCode()
|
216
|
+
|
217
|
+
> `static` **hashCode**(`value`): `string`
|
202
218
|
|
203
219
|
Calcula um código hash para uma string.
|
204
220
|
|
205
|
-
|
221
|
+
#### Parameters
|
222
|
+
|
223
|
+
• **value**: `string`
|
224
|
+
|
225
|
+
String que será gerado o hash code.
|
226
|
+
|
227
|
+
#### Returns
|
228
|
+
|
229
|
+
`string`
|
230
|
+
|
231
|
+
- Um hash calculado com base no valor informado.
|
232
|
+
|
233
|
+
#### Example
|
206
234
|
|
207
235
|
```ts
|
208
236
|
Informado: '123456' | Retorna: 1450575459
|
209
237
|
```
|
210
238
|
|
239
|
+
#### Source
|
240
|
+
|
241
|
+
src/utils/StringUtils.ts:158
|
242
|
+
|
243
|
+
***
|
244
|
+
|
245
|
+
### highlightValue()
|
246
|
+
|
247
|
+
> `static` **highlightValue**(`argument`, `matchFields`, `value`, `fieldMD`, `forceMatch`): `string`
|
248
|
+
|
211
249
|
#### Parameters
|
212
250
|
|
213
|
-
|
214
|
-
|
215
|
-
|
251
|
+
• **argument**: `String`
|
252
|
+
|
253
|
+
• **matchFields**: `any`
|
254
|
+
|
255
|
+
• **value**: `string`
|
256
|
+
|
257
|
+
• **fieldMD**: `any`
|
258
|
+
|
259
|
+
• **forceMatch**: `boolean`
|
216
260
|
|
217
261
|
#### Returns
|
218
262
|
|
219
263
|
`string`
|
220
264
|
|
221
|
-
|
222
|
-
|
223
|
-
#### Defined in
|
265
|
+
#### Source
|
224
266
|
|
225
|
-
src/utils/StringUtils.ts:
|
267
|
+
src/utils/StringUtils.ts:489
|
226
268
|
|
227
|
-
|
269
|
+
***
|
228
270
|
|
229
|
-
### isCaseable
|
271
|
+
### isCaseable()
|
230
272
|
|
231
|
-
|
273
|
+
> `static` **isCaseable**(`original`): `boolean`
|
232
274
|
|
233
275
|
Checa se uma string pode ser convertida para letras maiúsculas ou minúsculas
|
234
276
|
|
235
277
|
#### Parameters
|
236
278
|
|
237
|
-
|
238
|
-
|
239
|
-
|
279
|
+
• **original**: `string`
|
280
|
+
|
281
|
+
A string a ser verificada
|
240
282
|
|
241
283
|
#### Returns
|
242
284
|
|
@@ -244,24 +286,24 @@ Checa se uma string pode ser convertida para letras maiúsculas ou minúsculas
|
|
244
286
|
|
245
287
|
Se a string pode ser convertida
|
246
288
|
|
247
|
-
####
|
289
|
+
#### Source
|
248
290
|
|
249
|
-
src/utils/StringUtils.ts:
|
291
|
+
src/utils/StringUtils.ts:391
|
250
292
|
|
251
|
-
|
293
|
+
***
|
252
294
|
|
253
|
-
### isEmpty
|
295
|
+
### isEmpty()
|
254
296
|
|
255
|
-
|
297
|
+
> `static` **isEmpty**(`value`): `Boolean`
|
256
298
|
|
257
299
|
Retorna se a string está vazia.
|
258
300
|
Valores null e undefined são considerados como vazio.
|
259
301
|
|
260
302
|
#### Parameters
|
261
303
|
|
262
|
-
|
263
|
-
|
264
|
-
|
304
|
+
• **value**: `any`
|
305
|
+
|
306
|
+
String para ser validada.
|
265
307
|
|
266
308
|
#### Returns
|
267
309
|
|
@@ -269,23 +311,23 @@ Valores null e undefined são considerados como vazio.
|
|
269
311
|
|
270
312
|
- Verdadeiro caso a string não contenha informação.
|
271
313
|
|
272
|
-
####
|
314
|
+
#### Source
|
273
315
|
|
274
|
-
src/utils/StringUtils.ts:
|
316
|
+
src/utils/StringUtils.ts:18
|
275
317
|
|
276
|
-
|
318
|
+
***
|
277
319
|
|
278
|
-
### isLowerCase
|
320
|
+
### isLowerCase()
|
279
321
|
|
280
|
-
|
322
|
+
> `static` **isLowerCase**(`original`): `boolean`
|
281
323
|
|
282
324
|
Checa se uma string é minúscula
|
283
325
|
|
284
326
|
#### Parameters
|
285
327
|
|
286
|
-
|
287
|
-
|
288
|
-
|
328
|
+
• **original**: `string`
|
329
|
+
|
330
|
+
A string a ser verificada
|
289
331
|
|
290
332
|
#### Returns
|
291
333
|
|
@@ -293,59 +335,51 @@ Checa se uma string é minúscula
|
|
293
335
|
|
294
336
|
Se a string é minúscula
|
295
337
|
|
296
|
-
####
|
338
|
+
#### Source
|
297
339
|
|
298
|
-
src/utils/StringUtils.ts:
|
340
|
+
src/utils/StringUtils.ts:404
|
299
341
|
|
300
|
-
|
342
|
+
***
|
301
343
|
|
302
|
-
### isString
|
344
|
+
### isString()
|
303
345
|
|
304
|
-
|
346
|
+
> `static` **isString**(`text`): `boolean`
|
305
347
|
|
306
348
|
Verifica se argumento informado é do tipo string
|
307
349
|
|
308
350
|
#### Parameters
|
309
351
|
|
310
|
-
|
311
|
-
| :------ | :------ |
|
312
|
-
| `text` | `any` |
|
352
|
+
• **text**: `any`
|
313
353
|
|
314
354
|
#### Returns
|
315
355
|
|
316
356
|
`boolean`
|
317
357
|
|
318
|
-
####
|
358
|
+
#### Source
|
319
359
|
|
320
|
-
src/utils/StringUtils.ts:
|
360
|
+
src/utils/StringUtils.ts:38
|
321
361
|
|
322
|
-
|
362
|
+
***
|
323
363
|
|
324
|
-
### padEnd
|
364
|
+
### padEnd()
|
325
365
|
|
326
|
-
|
366
|
+
> `static` **padEnd**(`str`, `len`, `pad`): `string`
|
327
367
|
|
328
368
|
Adiciona caracteres à direita caso texto seja menor que o valor do parâmetro len passado.
|
329
369
|
|
330
|
-
|
370
|
+
#### Parameters
|
331
371
|
|
332
|
-
|
333
|
-
padStart('SANKHYA', 8,'.') | Retorna: 'SANKHYA...'
|
334
|
-
```
|
372
|
+
• **str**: `string`
|
335
373
|
|
336
|
-
|
374
|
+
Texto para ser ajustado.
|
337
375
|
|
338
|
-
|
339
|
-
padStart('SANKHYA', 5,'A') | Retorna: 'SANKHYA'
|
340
|
-
```
|
376
|
+
• **len**: `number`
|
341
377
|
|
342
|
-
|
378
|
+
Tamanho desejado do texto.
|
379
|
+
|
380
|
+
• **pad**: `string`= `" "`
|
343
381
|
|
344
|
-
|
345
|
-
| :------ | :------ | :------ | :------ |
|
346
|
-
| `str` | `string` | `undefined` | Texto para ser ajustado. |
|
347
|
-
| `len` | `number` | `undefined` | Tamanho desejado do texto. |
|
348
|
-
| `pad` | `string` | `" "` | Caractere a ser adicionado a direita caso o texto menor que o tamanho passado. |
|
382
|
+
Caractere a ser adicionado a direita caso o texto menor que o tamanho passado.
|
349
383
|
|
350
384
|
#### Returns
|
351
385
|
|
@@ -354,37 +388,41 @@ padStart('SANKHYA', 5,'A') | Retorna: 'SANKHYA'
|
|
354
388
|
- Texto passado se este for maior que o len.
|
355
389
|
Ou retorna o texto com os caracteres adicionados na direita.
|
356
390
|
|
357
|
-
####
|
391
|
+
#### Examples
|
392
|
+
|
393
|
+
```ts
|
394
|
+
padStart('SANKHYA', 8,'.') | Retorna: 'SANKHYA...'
|
395
|
+
```
|
396
|
+
|
397
|
+
```ts
|
398
|
+
padStart('SANKHYA', 5,'A') | Retorna: 'SANKHYA'
|
399
|
+
```
|
400
|
+
|
401
|
+
#### Source
|
358
402
|
|
359
|
-
src/utils/StringUtils.ts:
|
403
|
+
src/utils/StringUtils.ts:234
|
360
404
|
|
361
|
-
|
405
|
+
***
|
362
406
|
|
363
|
-
### padStart
|
407
|
+
### padStart()
|
364
408
|
|
365
|
-
|
409
|
+
> `static` **padStart**(`str`, `len`, `pad`): `string`
|
366
410
|
|
367
411
|
Adiciona caracteres à esquerda caso texto seja menor que o valor do parâmetro len passado.
|
368
412
|
|
369
|
-
|
413
|
+
#### Parameters
|
370
414
|
|
371
|
-
|
372
|
-
padStart('SANKHYA', 8,'.') | Retorna: '...SANKHYA'
|
373
|
-
```
|
415
|
+
• **str**: `string`
|
374
416
|
|
375
|
-
|
417
|
+
Texto para ser ajustado.
|
376
418
|
|
377
|
-
|
378
|
-
padStart('SANKHYA', 5,'A') | Retorna: 'SANKHYA'
|
379
|
-
```
|
419
|
+
• **len**: `number`
|
380
420
|
|
381
|
-
|
421
|
+
Tamanho desejado do texto.
|
422
|
+
|
423
|
+
• **pad**: `string`= `" "`
|
382
424
|
|
383
|
-
|
384
|
-
| :------ | :------ | :------ | :------ |
|
385
|
-
| `str` | `string` | `undefined` | Texto para ser ajustado. |
|
386
|
-
| `len` | `number` | `undefined` | Tamanho desejado do texto. |
|
387
|
-
| `pad` | `string` | `" "` | Caractere a ser adicionado a esquerda caso o texto menor que o tamanho passado. |
|
425
|
+
Caractere a ser adicionado a esquerda caso o texto menor que o tamanho passado.
|
388
426
|
|
389
427
|
#### Returns
|
390
428
|
|
@@ -393,24 +431,34 @@ padStart('SANKHYA', 5,'A') | Retorna: 'SANKHYA'
|
|
393
431
|
- Texto passado se este for maior que o len.
|
394
432
|
Ou retorna o texto com os caracteres adicionados na esquerda.
|
395
433
|
|
396
|
-
####
|
434
|
+
#### Examples
|
397
435
|
|
398
|
-
|
436
|
+
```ts
|
437
|
+
padStart('SANKHYA', 8,'.') | Retorna: '...SANKHYA'
|
438
|
+
```
|
399
439
|
|
400
|
-
|
440
|
+
```ts
|
441
|
+
padStart('SANKHYA', 5,'A') | Retorna: 'SANKHYA'
|
442
|
+
```
|
443
|
+
|
444
|
+
#### Source
|
401
445
|
|
402
|
-
|
446
|
+
src/utils/StringUtils.ts:209
|
403
447
|
|
404
|
-
|
448
|
+
***
|
449
|
+
|
450
|
+
### prettyPrecision()
|
451
|
+
|
452
|
+
> `static` `private` **prettyPrecision**(`strNumber`): `string`
|
405
453
|
|
406
454
|
Método interno. Remove zeros depois da vírgula diminuindo o tamanho
|
407
455
|
da string.
|
408
456
|
|
409
457
|
#### Parameters
|
410
458
|
|
411
|
-
|
412
|
-
|
413
|
-
|
459
|
+
• **strNumber**: `string`
|
460
|
+
|
461
|
+
representação textual do número a ser ajustado.
|
414
462
|
|
415
463
|
#### Returns
|
416
464
|
|
@@ -418,53 +466,92 @@ da string.
|
|
418
466
|
|
419
467
|
simplificação do strNumber, sem os zeros à direita depois do ponto.
|
420
468
|
|
421
|
-
####
|
469
|
+
#### Source
|
470
|
+
|
471
|
+
src/utils/StringUtils.ts:360
|
472
|
+
|
473
|
+
***
|
474
|
+
|
475
|
+
### removeSpecialCharacters()
|
476
|
+
|
477
|
+
> `static` **removeSpecialCharacters**(`str`): `string`
|
478
|
+
|
479
|
+
#### Parameters
|
480
|
+
|
481
|
+
• **str**: `string`
|
482
|
+
|
483
|
+
#### Returns
|
422
484
|
|
423
|
-
|
485
|
+
`string`
|
424
486
|
|
425
|
-
|
487
|
+
#### Source
|
426
488
|
|
427
|
-
|
489
|
+
src/utils/StringUtils.ts:476
|
428
490
|
|
429
|
-
|
491
|
+
***
|
492
|
+
|
493
|
+
### replaceAccentuatedChars()
|
494
|
+
|
495
|
+
> `static` **replaceAccentuatedChars**(`text`, `removeSpecialChars`): `string`
|
430
496
|
|
431
497
|
Remove acentuação de vogais e de caracteres especiais que não sejam letras ou numeral.
|
432
498
|
|
433
|
-
|
499
|
+
#### Parameters
|
500
|
+
|
501
|
+
• **text**: `string`
|
502
|
+
|
503
|
+
String para ser transformada.
|
504
|
+
|
505
|
+
• **removeSpecialChars**: `boolean`= `true`
|
506
|
+
|
507
|
+
Remove outros caracteres especiais que não sejam letras e números.
|
508
|
+
|
509
|
+
#### Returns
|
510
|
+
|
511
|
+
`string`
|
512
|
+
|
513
|
+
#### Example
|
434
514
|
|
435
515
|
```ts
|
436
516
|
entrada: "á@Êç#Ò", false // retorno: "a@Ec#O"
|
437
517
|
entrada: "á@Êç#Ò", true // retorno: "aEcO"
|
438
518
|
```
|
439
519
|
|
520
|
+
#### Source
|
521
|
+
|
522
|
+
src/utils/StringUtils.ts:124
|
523
|
+
|
524
|
+
***
|
525
|
+
|
526
|
+
### replaceAccentuatedCharsHtmlEntities()
|
527
|
+
|
528
|
+
> `static` **replaceAccentuatedCharsHtmlEntities**(`source`): `string`
|
529
|
+
|
440
530
|
#### Parameters
|
441
531
|
|
442
|
-
|
443
|
-
| :------ | :------ | :------ | :------ |
|
444
|
-
| `text` | `string` | `undefined` | String para ser transformada. |
|
445
|
-
| `removeSpecialChars` | `boolean` | `true` | Remove outros caracteres especiais que não sejam letras e números. |
|
532
|
+
• **source**: `string`
|
446
533
|
|
447
534
|
#### Returns
|
448
535
|
|
449
536
|
`string`
|
450
537
|
|
451
|
-
####
|
538
|
+
#### Source
|
452
539
|
|
453
|
-
src/utils/StringUtils.ts:
|
540
|
+
src/utils/StringUtils.ts:437
|
454
541
|
|
455
|
-
|
542
|
+
***
|
456
543
|
|
457
|
-
### replaceAccentuatedCharsKeepSymbols
|
544
|
+
### replaceAccentuatedCharsKeepSymbols()
|
458
545
|
|
459
|
-
|
546
|
+
> `static` **replaceAccentuatedCharsKeepSymbols**(`text`): `string`
|
460
547
|
|
461
548
|
Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta mantendo espaços e símbolos.
|
462
549
|
|
463
550
|
#### Parameters
|
464
551
|
|
465
|
-
|
466
|
-
|
467
|
-
|
552
|
+
• **text**: `string`
|
553
|
+
|
554
|
+
Texto para ser transformado.
|
468
555
|
|
469
556
|
#### Returns
|
470
557
|
|
@@ -472,79 +559,101 @@ Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta ma
|
|
472
559
|
|
473
560
|
- Texto sem acentuação e caixa alta, mantendo espaços e símbolos.
|
474
561
|
|
475
|
-
####
|
562
|
+
#### Source
|
476
563
|
|
477
|
-
src/utils/StringUtils.ts:
|
564
|
+
src/utils/StringUtils.ts:143
|
478
565
|
|
479
|
-
|
566
|
+
***
|
480
567
|
|
481
|
-
### replaceAccentuatedCharsLower
|
568
|
+
### replaceAccentuatedCharsLower()
|
482
569
|
|
483
|
-
|
570
|
+
> `static` **replaceAccentuatedCharsLower**(`text`): `string`
|
484
571
|
|
485
572
|
Remove acentos de vogais minúsculas.
|
486
573
|
|
487
|
-
|
574
|
+
#### Parameters
|
575
|
+
|
576
|
+
• **text**: `string`
|
577
|
+
|
578
|
+
String para ser transformada.
|
579
|
+
|
580
|
+
#### Returns
|
581
|
+
|
582
|
+
`string`
|
583
|
+
|
584
|
+
#### Example
|
488
585
|
|
489
586
|
```ts
|
490
587
|
entrada: "áêçò" // retorno: "aeco"
|
491
588
|
```
|
492
589
|
|
493
|
-
####
|
590
|
+
#### Source
|
494
591
|
|
495
|
-
|
496
|
-
| :------ | :------ | :------ |
|
497
|
-
| `text` | `string` | String para ser transformada. |
|
592
|
+
src/utils/StringUtils.ts:101
|
498
593
|
|
499
|
-
|
594
|
+
***
|
500
595
|
|
501
|
-
|
596
|
+
### replaceAccentuatedCharsUpper()
|
502
597
|
|
503
|
-
|
598
|
+
> `static` **replaceAccentuatedCharsUpper**(`text`): `string`
|
504
599
|
|
505
|
-
|
600
|
+
Remove acentos de vogais maiúsculas
|
506
601
|
|
507
|
-
|
602
|
+
#### Parameters
|
508
603
|
|
509
|
-
|
604
|
+
• **text**: `string`
|
510
605
|
|
511
|
-
|
606
|
+
String para ser transformada.
|
512
607
|
|
513
|
-
|
608
|
+
#### Returns
|
514
609
|
|
515
|
-
|
610
|
+
`string`
|
611
|
+
|
612
|
+
#### Example
|
516
613
|
|
517
614
|
```ts
|
518
615
|
entrada: "ÁÊÇÒ" // retorno: "AECO"
|
519
616
|
```
|
520
617
|
|
618
|
+
#### Source
|
619
|
+
|
620
|
+
src/utils/StringUtils.ts:49
|
621
|
+
|
622
|
+
***
|
623
|
+
|
624
|
+
### replaceAll()
|
625
|
+
|
626
|
+
> `static` **replaceAll**(`str`, `strFrom`, `strTo`): `string`
|
627
|
+
|
521
628
|
#### Parameters
|
522
629
|
|
523
|
-
|
524
|
-
|
525
|
-
|
630
|
+
• **str**: `string`
|
631
|
+
|
632
|
+
• **strFrom**: `string`
|
633
|
+
|
634
|
+
• **strTo**: `string`
|
526
635
|
|
527
636
|
#### Returns
|
528
637
|
|
529
638
|
`string`
|
530
639
|
|
531
|
-
####
|
640
|
+
#### Source
|
532
641
|
|
533
|
-
src/utils/StringUtils.ts:
|
642
|
+
src/utils/StringUtils.ts:467
|
534
643
|
|
535
|
-
|
644
|
+
***
|
536
645
|
|
537
|
-
### replaceBlankCharacters
|
646
|
+
### replaceBlankCharacters()
|
538
647
|
|
539
|
-
|
648
|
+
> `static` **replaceBlankCharacters**(`value`): `string`
|
540
649
|
|
541
650
|
Utilitário para remover caracteres em branco da string.
|
542
651
|
|
543
652
|
#### Parameters
|
544
653
|
|
545
|
-
|
546
|
-
|
547
|
-
|
654
|
+
• **value**: `string`
|
655
|
+
|
656
|
+
String a ser removido os espaços.
|
548
657
|
|
549
658
|
#### Returns
|
550
659
|
|
@@ -552,30 +661,44 @@ Utilitário para remover caracteres em branco da string.
|
|
552
661
|
|
553
662
|
String sem espaços em branco.
|
554
663
|
|
555
|
-
####
|
664
|
+
#### Source
|
556
665
|
|
557
|
-
src/utils/StringUtils.ts:
|
666
|
+
src/utils/StringUtils.ts:325
|
558
667
|
|
559
|
-
|
668
|
+
***
|
560
669
|
|
561
|
-
###
|
670
|
+
### replaceToSpace()
|
562
671
|
|
563
|
-
|
672
|
+
> `static` **replaceToSpace**(`source`, `replaceList`): `string`
|
564
673
|
|
565
|
-
|
566
|
-
Combina palavras compostas ou frases, alterando a inicial de cada uma, a partir da primeira, para maiúscula e unidas sem espaços.
|
674
|
+
#### Parameters
|
567
675
|
|
568
|
-
|
676
|
+
• **source**: `string`
|
569
677
|
|
570
|
-
|
571
|
-
|
572
|
-
|
678
|
+
• **replaceList**: `string`[]= `[]`
|
679
|
+
|
680
|
+
#### Returns
|
681
|
+
|
682
|
+
`string`
|
683
|
+
|
684
|
+
#### Source
|
685
|
+
|
686
|
+
src/utils/StringUtils.ts:420
|
687
|
+
|
688
|
+
***
|
689
|
+
|
690
|
+
### toCamelCase()
|
691
|
+
|
692
|
+
> `static` **toCamelCase**(`value`): `string`
|
693
|
+
|
694
|
+
Converte string em camelCase.
|
695
|
+
Combina palavras compostas ou frases, alterando a inicial de cada uma, a partir da primeira, para maiúscula e unidas sem espaços.
|
573
696
|
|
574
697
|
#### Parameters
|
575
698
|
|
576
|
-
|
577
|
-
|
578
|
-
|
699
|
+
• **value**: `string`
|
700
|
+
|
701
|
+
String a ser convertida.
|
579
702
|
|
580
703
|
#### Returns
|
581
704
|
|
@@ -583,23 +706,29 @@ toCamelCase('Exemplo de uso') | Retorna: 'exemploDeUso'
|
|
583
706
|
|
584
707
|
String convertida em camelCase.
|
585
708
|
|
586
|
-
####
|
709
|
+
#### Example
|
710
|
+
|
711
|
+
```ts
|
712
|
+
toCamelCase('Exemplo de uso') | Retorna: 'exemploDeUso'
|
713
|
+
```
|
714
|
+
|
715
|
+
#### Source
|
587
716
|
|
588
|
-
src/utils/StringUtils.ts:
|
717
|
+
src/utils/StringUtils.ts:276
|
589
718
|
|
590
|
-
|
719
|
+
***
|
591
720
|
|
592
|
-
### toKebabCase
|
721
|
+
### toKebabCase()
|
593
722
|
|
594
|
-
|
723
|
+
> `static` **toKebabCase**(`value`): `string`
|
595
724
|
|
596
725
|
Utilitário para converter string em kebab-case.
|
597
726
|
|
598
727
|
#### Parameters
|
599
728
|
|
600
|
-
|
601
|
-
|
602
|
-
|
729
|
+
• **value**: `string`
|
730
|
+
|
731
|
+
String a ser convertida.
|
603
732
|
|
604
733
|
#### Returns
|
605
734
|
|
@@ -607,23 +736,23 @@ Utilitário para converter string em kebab-case.
|
|
607
736
|
|
608
737
|
String convertida em KebabCase.
|
609
738
|
|
610
|
-
####
|
739
|
+
#### Source
|
611
740
|
|
612
|
-
src/utils/StringUtils.ts:
|
741
|
+
src/utils/StringUtils.ts:316
|
613
742
|
|
614
|
-
|
743
|
+
***
|
615
744
|
|
616
|
-
### toPascalCase
|
745
|
+
### toPascalCase()
|
617
746
|
|
618
|
-
|
747
|
+
> `static` **toPascalCase**(`value`): `string`
|
619
748
|
|
620
749
|
Converte string para PascalCase.
|
621
750
|
|
622
751
|
#### Parameters
|
623
752
|
|
624
|
-
|
625
|
-
|
626
|
-
|
753
|
+
• **value**: `string`
|
754
|
+
|
755
|
+
String a ser convertida.
|
627
756
|
|
628
757
|
#### Returns
|
629
758
|
|
@@ -631,23 +760,23 @@ Converte string para PascalCase.
|
|
631
760
|
|
632
761
|
String convertida em PascalCase.
|
633
762
|
|
634
|
-
####
|
763
|
+
#### Source
|
635
764
|
|
636
|
-
src/utils/StringUtils.ts:
|
765
|
+
src/utils/StringUtils.ts:291
|
637
766
|
|
638
|
-
|
767
|
+
***
|
639
768
|
|
640
|
-
### toSnakeCase
|
769
|
+
### toSnakeCase()
|
641
770
|
|
642
|
-
|
771
|
+
> `static` **toSnakeCase**(`value`): `string`
|
643
772
|
|
644
773
|
Utilitário para converter string em snake_case.
|
645
774
|
|
646
775
|
#### Parameters
|
647
776
|
|
648
|
-
|
649
|
-
|
650
|
-
|
777
|
+
• **value**: `string`
|
778
|
+
|
779
|
+
String a ser convertida.
|
651
780
|
|
652
781
|
#### Returns
|
653
782
|
|
@@ -655,6 +784,6 @@ Utilitário para converter string em snake_case.
|
|
655
784
|
|
656
785
|
String convertida em snake_case.
|
657
786
|
|
658
|
-
####
|
787
|
+
#### Source
|
659
788
|
|
660
|
-
src/utils/StringUtils.ts:
|
789
|
+
src/utils/StringUtils.ts:303
|