Im dealing with a list of lines, and I need to count the hashes that occur at the beginning.
# item 1
## item 1, 1
## item 1, 2
# item 2
and so on.
If each line is a QString, how can I return the number of hashes occurring at the beginning of the string?
QString s("### foo # bar ");
int numberOfHashes = s.count("#"); // Answer should be 3, not 4