Option trim
The trim option ignore whitespace characters immediately around the delimiter. Defaults to false. It does not remove whitespace present inside the quotes of a field.
- Type:
boolean - Optional
- Default:
false - Since: early days
- Related:
ltrim,rtrim— see Available Options
The characters interpreted as trimable are ECMAScript whitespaces and line terminator set.
- Basic Latin
- Latin-1 Supplement
- Ogham
- General Punctuation
0x2000EN QUAD0x2001EM QUAD0x2002EN SPACE0x2003EM SPACE0x2004THREE-PER-EM SPACE0x2005FOUR-PER-EM SPACE0x2006SIX-PER-EM SPACE0x2007FIGURE SPACE0x2008PUNCTUATION SPACE0x2009THIN SPACE0x200aHAIR SPACE0x2028LINE SEPARATOR0x2029PARAGRAPH SEPARATOR0x202fNARROW NO-BREAK SPACE (NNBSP)0x205fMEDIUM MATHEMATICAL SPACE (MMSP)0x3000IDEOGRAPHIC SPACE0xfeffZERO WIDTH NO-BREAK SPACE (BOM)
Example
This example insert spaces around fields at multiple locations.