Skip to main content

truncateString()

function truncateString(input, maxLength): string

Function to truncate a string to a specified length.

Parameters

ParameterTypeDescription
inputstringThe input string.
maxLengthnumberThe maximum length of the truncated string.

Returns

string

The truncated string.