Skip to content

@technobuddha > library > String > Operations

Function: collapseBreakingSpace() ​

ts
function collapseBreakingSpace(input: string, trim: CollapseBreakingSpaceOptions): string;

Defined in: collapse-breaking-space.ts:21

Replace all breaking space (space, tab, carriage return, new line) with a single space

Parameters ​

ParameterTypeDescription
inputstringThe string
trimCollapseBreakingSpaceOptionsIf true, remove leading and trailing whitespace

Returns ​

string