HAS_CONTROL_CHARS Function

Determines whether a string contains ASCII control characters.

Category: String
Returned data type: Boolean

Syntax

HAS_CONTROL_CHAR(string)

Required Argument

string

specifies a string to be search for the existence of ASCII control characters.

Details

The HAS_CONTROL_CHARS function can be used to identify non-printable ASCII control characters as found on the ASCII character table. A return value of TRUE indicates that control characters were found. A return value of FALSE indicates that control characters were not found.
Note: The only control character the HAS_CONTROL_CHARS function does not detect is 0 (null character).
See Appendix B: ASCII Control Characters for a list of control characters.

Example

boolean result_1
 
string error_message1
 
string test
test="Contol character: "&chr(13)
result_1=has_control_chars(test)
if(result_1)
   error_message1 = "test string contains control character"
else
   error_message1 = "test string does not contain control character"