str_unescape_c
num_replaced.i4.v = str_unescape_c(source_string.i1a.r, length.i4.v,
output_string.i1a.r, type.i4.v,
options.u4.v)
This routine replaces escape characters in a string with the
original characters.
source_string source string containing escape characters
length length of string (If a value of zero is passed,
the length of the string will be calculated.)
output_string returned null terminated string with escape
characters replaced (This argument can point to
the original string.)
type type of escape characters to look for
(STR_ESCAPE_C -> C/C++ escape characters,
STR_ESCAPE_URL -> URL escape characters,
STR_ESCAPE_HTML -> HTML escape characters,
STR_ESCAPE_BASH -> BASH escape characters,
STR_ESCAPE_QUOTES -> escaped quote characters)
options use options
(STR_OPT_NONE -> no options selected,
STR_OPT_HANDLE_QUOTES -> preserve characters in
quoted substrings)
This function returns status values as follows:
CLIB_INVARG invalid escape character type requested
otherwise number of characters replaced
This function requires the following include files:
cbslib_h
Related functions:
str_escape_c, str_escape_set_c, str_escape_quotes_in_sql_string_c,
str_replace_character_c, str_replace_char_c,
str_replace_character_set_c, str_replace_char_set_c,
str_replace_characters_with_string_c,
str_replace_characters_with_strings_c, str_translate_characters_c,
str_remove_char_set_c, str_find_character_c, str_find_character_set_c,
str_replace_string_c, str_replace_bracketed_c, str_find_string_c,
str_find_last_string_c, str_character_count_c, str_expand_tabs_c,
str_make_printable_c, str_find_not_in_character_set_c
C/C++ usage:
static char source_string[] = "string+string";
int num_replaced;
int length = 0;
int type = STR_ESCAPE_URL;
unsigned int options = STR_OPT_NONE;
num_replaced = str_unescape_c(source_string,length,source_string,
type,options);