Skip to content

@technobuddha > library > String > Deconstruction

Function: splitWords() ​

ts
function splitWords(input: string, options: SplitWordsOptions): string[];

Defined in: split-words.ts:23

Split a string into an array of words

Parameters ​

ParameterTypeDescription
inputstringThe string to split
optionsSplitWordsOptionssee SplitWordsOptions

Returns ​

string[]

array of words

Default Value ​

ts
delimiter whitespace