Skip to content

@technobuddha > library > String > Deconstruction

Function: chop() ​

ts
function chop(
   input: string, 
   length: number, 
   __namedParameters: ChopOptions): string[];

Defined in: chop.ts:21

Break a string into equal sized segments of characters

Parameters ​

ParameterTypeDescription
inputstringThe string to break apart
lengthnumberThe length of each segment
__namedParametersChopOptions-

Returns ​

string[]

Array of segments