Solved QString startsWith (")
-
Hello guys ,
i want to test if a QString start with the character (") return true else return false , i tried startsWith(""") but it didn't work
for exemple "Hello World" ==true (it starts with the character " )
Hello World" ==false (it didn't start with the character " )Thanks guys
-
@Zunneh
What did you actually try? Copying from what you have written:startsWith(""")
won't compile in C++, so it can't be that....
Did you try
startsWith("\"")
? -
QString myTest("\"Hello Wolrd"); if (myTest.indexOf(QChar('"')) == 0) { // starts with double quote }
-
Thank you guys , the two solutions works perfectly ('"') or ("\n")
-
@Zunneh if your issue is solved, please don't forget to mark your post as such. Thanks.