Quote Originally Posted by cydside View Post
Thanks, who is the next?
I hope you don't want to pull my leg. Where is the problem in combining that with normal c++ rules?
Qt Code:
  1. QString capitalize(const QString &str)
  2. {
  3. QString tmp = str;
  4. // if you want to ensure all other letters are lowercase:
  5. tmp = tmp.toLower();
  6. tmp[0] = str[0].toUpper();
  7. return tmp;
  8. }
To copy to clipboard, switch view to plain text mode