libscsv manual
Version 1.1
scsv::str_is_quoted

Tells if provided text (or part of it) is quoted or not, in context of built-in CSV parser. It recognizes cases when text is NULL-terminated or columns separator stands in the middle of it, right after the unquote character.

"quoted text"\0    // ok
"quoted text",other text\0  // also ok
"some text\0    // not ok

The scsv::set_unquote can be used to set the tested quote character and scsv::set_iseparator to detect columns inside text.

const char * scsv::str_is_quoted(const char * cStr);
declared in scsv.h, include scsv.h
Parameters
cStr
C-string to be tested.
Return

If first character of cStr equals provided unquote character, location of next occurence of unquote character is returned but only if following character equals internal columns separator or NULL-terminating byte. NULL pointer is returned otherwise.

Released under the GNU Free Documentation License
by TinyIT
Last modified 2017-10-17