Get the character at index
Install
Install all functions of strman
yarn add strman
or just the at function
yarn add strman.at
Usage
import { at } from 'strman'
// OR
import at from 'strman.at'
Parameters:
Name | Type | Description |
---|---|---|
value |
String | The input string |
index |
Number | The index for which to extract the character |
Returns:
The character at position index
- Type
- String
Example
at('abc', 1)
// => 'b'