Optional
emptyValue to return if the text was only an empty string (after trimming) Defaults to ''. Can be any string or null
Optional
trimDetermines if leading and trailing whitespace is discarded. Defaults to true. Can be 'start' to trim only starting whitespace and 'end' to trim only ending whitespace.
Optional
compressWhen true, 2 or more back-to-back whitespaces are replaced by a single whitespace character. This is always run before replaceWhitespace and after stripCharacters, so you can turn: "203 - 533 - (3999)" into 203533(3999) when stripping "-" and using this. Defaults to false.
Optional
replaceReplaces all whitespace with this string. Does nothing if null. This option is run after compressWhitespace.
Optional
stripRemoves any character found in the string. Does nothing if null. This option runs before compressWhitespace and replaceWhitespace.
Optional
convertConvert the case. Supports 'upper' and 'lower'. Does nothing if null.
Generated using TypeDoc v0.25.12
Options to configure CleanUpStringParser