Alias to substr function.
Install
Install all functions of strman
yarn add strmanor just the substr function
yarn add strman.substrUsage
import { substr } from 'strman'
// OR
import substr from 'strman.substr'Parameters:
| Name | Type | Description |
|---|---|---|
value |
String | The String! |
start |
Number | Substring starts. |
length |
Number | Substring length. |
Returns:
The Substring!
- Type
- String
Example
substr('strman', 0, 3)
// => 'strm'