Skip to content

nsuite v2.2.1


nsuite / limitStringLength

Function: limitStringLength()

limitStringLength<T>(str, len): T

Defined in: UtilsString.ts:99

Limit a string to the specified maximum length

Type Parameters

T

T extends string

Parameters

str

T

len

number

Returns

T

Example

ts
import { limitStringLength } from 'nsuite'
console.log(limitStringLength('nsuite', 3))

Released under the Apache-2.0 License.