QString documentation issue

Discuss anything related to product development
Post Reply
seasoned_geek
Posts: 254
Joined: Thu Jun 11 2020 12:18 pm

QString documentation issue

Post by seasoned_geek »

https://www.copperspice.com/docs/cs_api/class_qstring8.html#a8d651b901c43247c716f215e0eab5403

remove using regular expression says:

Removes every occurrence of the regular expression regExp in the string and returns a reference to the string.

Code: Select all

QString str = "trombone";
str.remove(QRegularExpression("[aeiou]."));                       // str == "trmbne"
You will note the "e" left on the end of the comment indicating what would be left.
barbara
Posts: 447
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: QString documentation issue

Post by barbara »

Thanks for catching this. Turns out the correct result is actually "trbe" since the "." in the regex will remove any character following a vowel. We are making the change in the API docs.
Post Reply