P
P
Pavel Mikhalovsky2016-03-13 22:18:42
Programming
Pavel Mikhalovsky, 2016-03-13 22:18:42

How to take a single character by index in a QString?

There is a string, it is necessary to check the presence of brackets in it, I wanted to compare each character from the string with brackets

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Martyanov, 2016-03-13
@pavel9609

What about str[0] doesn't suit you? It seems exactly what you need ...
If you need to check for the presence of at least one required character in a string, the indexOf method already implements what you want to do yourself.
PS. Documentation search is faster than registration on the site, by the way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question