last

Return the last 'n' chars of string.

Install

Install all functions of strman

yarn add strman

or just the last function

yarn add strman.last

Usage

import { last } from 'strman'
// OR
import last from 'strman.last'
Parameters:
Name Type Description
value String

The String!

n String

Number of chars to return.

Source:
Returns:

Return 'n' lasts chars.

Type
String
Example
const title = 'strman'
last(title, 3)
// => 'man'