Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r096

D toc

Excerpt

Removes all whitespace from a string, including leading and trailing whitespace and all whitespace within the string.

Spacing between words is removed.

D s lang vs sql

D s
snippetBasic

Column reference example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:removewhitespace(MyName)

removewhitespace(MyName)

Output: Returns the value of the MyName column value with all whitespace removed. 

String literal example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:removewhitespace(' Hello, World ')

removewhitespace(' Hello, World ')

Output: Returns the string: Hello,World.

D s
snippetSyntax

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:removewhitespace(column_string)

removewhitespace(column_string)


ArgumentRequired?Data TypeDescription
column_stringYstringName of the column or string literal to be applied to the function

D s lang notes

column_string

Name of the column or string constant to be cleaned of whitespace.

  • Missing string or column values generate missing string results.
  • String constants must be quoted ('Hello, World').
  • Multiple columns and wildcards are not supported.

D s
snippetusage

Required?Data TypeExample Value
YesString literal or column referencemyColumn

D s
snippetExamples

Example - String cleanup functions together

Include Page
EXAMPLE - String Cleanup Functions
EXAMPLE - String Cleanup Functions

D s also
labelstring