Methods
(static) endsWith(string, string) → {boolean}
- Source:
- Since:
- 0.5.0
- See:
Return true if the input string ends with the test string
Example
> endsWith('Ping', 'ing')
true
> endsWith('Pong', 'ing')
false
Parameters:
Name | Type | Description |
---|---|---|
string |
string | The input string |
string |
string | The test string |
Returns:
- True if the input string ends with the test string
- Type
- boolean
(static) startsWith(string, string) → {boolean}
- Source:
- Since:
- 0.1.0
- See:
Return true if the input string starts with the test string
Example
> startsWith('Ping', 'Pin')
true
> startsWith('Pong', 'Pin')
false
Parameters:
Name | Type | Description |
---|---|---|
string |
string | The input string |
string |
string | The test string |
Returns:
- True if the input string starts with the test string
- Type
- boolean