Cutwater

Cutwater

  • Docs
  • Help
  • GitHub

StringUtils

@codification/cutwater-core > StringUtils

Class

Utility for handling common string related tasks.

beta:

Hierarchy

StringUtils

Methods

  • contains
  • endsWith
  • isBlank
  • isEmpty
  • startsWith

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:

NameTypeDefault valueDescription
valuestring-the value to be searched
searchTermstring-the value to be searched for
Default value caseInsensitivebooleanfalsetrue 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:

NameTypeDefault valueDescription
valuestring-the value to be searched
searchTermstring-the suffix to be searched for
Default value caseInsensitivebooleanfalsetrue 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:

NameTypeDefault valueDescription
Default value valuestring""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:

NameTypeDefault valueDescription
Default value valuestring""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:

NameTypeDefault valueDescription
valuestring-the value to be searched
searchTermstring-the prefix to be searched for
Default value caseInsensitivebooleanfalsetrue if the match should be case sensitive

Returns: boolean true if the value starts with the search term


  • Class
  • Hierarchy
    • Methods
  • Methods
    • `` contains
    • `` endsWith
    • `` isBlank
    • `` isEmpty
    • `` startsWith
Cutwater
Docs
Getting Started
Community
Stack Overflow
More
GitHubStar
Copyright © 2019 Codification.org