PRO_ARR_ESCAPE function
- Last Updated: December 12, 2014
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
PRO_ARR_ESCAPE function
Adds required escape characters to a single element of a character array.
PRO_ARR_ESCAPE scans
the char_element looking for the separator character
( ; ) or an escape character ( ~ ). The function inserts an additional
escape character when it finds any of these constructs:
- Escape character followed by a separator character ( ~; )
- Escape character followed by another escape character ( ~~ )
- Escape character followed by a
NULLterminator ( ~\0 )
Syntax
|
Parameter
- char_element
-
The character representation of an array element, without any leading or trailing separators. Must be data type
NVARCHAR,orVARCHAR,orCHAR.
Notes
-
char_element must
be data type
NVARCHAR,VARCHAR, orCHAR. - char_element must not be the name of an array column, since the column contains true separators that would be destroyed by this function.
Examples
The
following example returns the string 'aa~;aa':
|
The following example returns the string 'aa~aa'. There
is no change, since another special character does not follow the
escape character:
|
This example returns the string 'aa~~;aa':
|