Returns the string or text sent as argument to the function, except when the value is null, in which case returns null.
1 string.trim2null
<string.trim2null>
<value /> !
</string.trim2null>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Evalue | string |
Returns | |
---|---|
Type | Description |
string | Returns null if the value passed is null and if not, the value passed to the function. |
Exceptions
requires 1 arguments, received: ...
The entry parameter has not been specified.
Example
Apply the function to a string of characters and to a null value.
Copy
<xsql-script name='string_trim2null'> <body> <set name='a'><string.trim2null>STR1</string.trim2null></set> <println><a/></println> <set name='b'><string.trim2null>null</string.trim2null></set> <println><b/></println> </body> </xsql-script>
Returns:
Copy
STR1 null