Returns a new string with the 'prefix' removed, if present.
Install
Install all functions of strman
yarn add strman
or just the removeLeft function
yarn add strman.removeleft
Usage
import { removeLeft } from 'strman'
// OR
import removeLeft from 'strman.removeleft'
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
String | The String! |
||
prefix |
String | String to remove on left. |
||
caseSensitive |
Boolean |
<optional> |
true | If you need to caseSensitive. |
- Source:
Returns:
The String without prefix!
- Type
- String
Example
const title = 'strman'
removeLeft(title, 'str')
// => 'man'