StringUtils
@codification/cutwater-core > StringUtils
Class
Utility for handling common string related tasks.
beta:
Hierarchy
StringUtils
Methods
Methods
<Static>
contains
▸ contains(value: string
, searchTerm: string
, caseInsensitive?: boolean
): boolean
Defined in StringUtils.ts:37
Returns true
if the value
contains the searchTerm
. By default, this function is case sensitive.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
value | string | - | the value to be searched |
searchTerm | string | - | the value to be searched for |
Default value caseInsensitive | boolean | false | true if the match should be case sensitive |
Returns: boolean
true if the value contains the search term
<Static>
endsWith
▸ endsWith(value: string
, searchTerm: string
, caseInsensitive?: boolean
): boolean
Defined in StringUtils.ts:71
Returns true
if the value
ends with the searchTerm
. By default, this function is case sensitive.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
value | string | - | the value to be searched |
searchTerm | string | - | the suffix to be searched for |
Default value caseInsensitive | boolean | false | true if the match should be case sensitive |
Returns: boolean
true if the value ends with the search term
<Static>
isBlank
▸ isBlank(value?: string
): boolean
Defined in StringUtils.ts:15
Returns true
if the value is a string containing only whitespace or is empty.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
Default value value | string | "" | the string to be checked |
Returns: boolean
true if the value is blank
<Static>
isEmpty
▸ isEmpty(value?: string
): boolean
Defined in StringUtils.ts:25
Returns true
if the value is a string is empty.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
Default value value | string | "" | the string to be checked |
Returns: boolean
true if the string is empty
<Static>
startsWith
▸ startsWith(value: string
, searchTerm: string
, caseInsensitive?: boolean
): boolean
Defined in StringUtils.ts:54
Returns true
if the value
starts with the searchTerm
. By default, this function is case sensitive.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
value | string | - | the value to be searched |
searchTerm | string | - | the prefix to be searched for |
Default value caseInsensitive | boolean | false | true if the match should be case sensitive |
Returns: boolean
true if the value starts with the search term