QString.indexOf ( "",""); ??
-
Hi..
How to search these three characters "," in a QString ?
int t = line.indexOf( "","" );
Does not work..
Thanks..
-
Hi, welcome to the forum.
" marks a beginning and end of a string. To use it as a character you have to escape it with \:int t = line.indexOf( "\",\"" );or you can use a raw string literal, which is delimited by R"( and )" like this:
int t = line.indexOf( R"(",")" );but this one is better for longer or more complicated strings.