Excerpt |
---|
Removes all whitespace from a string, including leading and trailing whitespace and all whitespace within the string. |
Spacing between words is removed.
Column reference example:
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive 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 |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value:removewhitespace(' Hello, World ') |
---|
|
removewhitespace(' Hello, World ') |
Output: Returns the string: Hello,World
.
D lang syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value:removewhitespace(column_string) |
---|
|
removewhitespace(column_string) |
Argument | Required? | Data Type | Description |
---|
column_string | Y | string | Name of the column or string literal to be applied to the function |
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.
Required? | Data Type | Example Value |
---|
Yes | String literal or column reference | myColumn |
Example - String cleanup functions together
Include Page |
---|
| EXAMPLE - String Cleanup Functions |
---|
| EXAMPLE - String Cleanup Functions |
---|
|