Remove comments from a string
String_Type str_uncomment_string(String_Type s, String_Type beg, String_Type end)
This function may be used to remove comments from a string s
.
The parameters, beg
and end
, are strings of equal length
whose corresponding characters specify the begin and end comment
characters, respectively. It returns the uncommented string.
The expression
str_uncomment_string ("Hello (testing) 'example' World", "'(", "')")
returns the string "Hello World"
.
This routine does not handle multicharacter comment delimiters and it assumes that comments are not nested.
str_quote_string