Solved QChar isSymbol, if "[" isn't a symbol what is it?
-
The documentation for isSymbol isn't that clear, I would have thought that any character that is not a space, number or letter must be a symbol, but it appears not.
-
QChar::isSymbol() returns true when it's in one of the four categories:
QChar::Symbol_Math 26 Unicode class name Sm
QChar::Symbol_Currency 27 Unicode class name Sc
QChar::Symbol_Modifier 28 Unicode class name Sk
QChar::Symbol_Other 29 Unicode class name SoBut the left bracket is in category Ps: https://www.fileformat.info/info/unicode/char/005b/index.htm (QChar::Punctuation_Open)
So nothing which Qt can do against.
-
QChar::isSymbol() returns true when it's in one of the four categories:
QChar::Symbol_Math 26 Unicode class name Sm
QChar::Symbol_Currency 27 Unicode class name Sc
QChar::Symbol_Modifier 28 Unicode class name Sk
QChar::Symbol_Other 29 Unicode class name SoBut the left bracket is in category Ps: https://www.fileformat.info/info/unicode/char/005b/index.htm (QChar::Punctuation_Open)
So nothing which Qt can do against.
-
so there's also .isPunct() to check for punctuation.