56.13 REPLACE_WHITESPACE Function
This function can be used to tokenize the input. It replaces white space and special
characters with the given whitespace character. It also lower-cases the input. If
p_original_find
contains '.
' or
'#
', these characters are also replaced by white space.
Syntax
APEX_STRING_UTIL.REPLACE_WHITESPACE (
p_string IN VARCHAR,
p_original_find IN VARCHAR2 DEFAULT NULL,
p_whitespace_character IN VARCHAR2 DEFAULT '|')
RETURN VARCHAR2;
Parameters
Parameter | Description |
---|---|
p_string |
The input string. |
p_original_find |
A set of characters that were already found in a preceding search operation. |
p_whitespace_character |
The separator character. |
Returns
This function returns the input string in lower case with all special characters replaced.
Example
select apex_string_util.replace_whitespace('foo: Bar...Baz') from dual
-> |foo|bar|baz|
select apex_string_util.replace_whitespace('foo: Bar...Baz',null,'*') from dual
-> *foo*bar*baz*
select apex_string_util.replace_whitespace('foo: Bar...Baz','.','*') from dual
-> *foo*bar...baz*
Parent topic: APEX_STRING_UTIL