-1

I just wanted to know what the technical term for allocating words from a string separated by spaces to a variable is called so I can look up a tutorial for it. Any terms, links, or explanations would be greatly appreciated.

Nejat
  • 31,784
  • 12
  • 106
  • 138
user3183403
  • 63
  • 1
  • 2
  • 8

1 Answers1

2

You can do it like:

QString lineText = "some sample words";

QStringList tokens= lineText.split(" ",QString::SkipEmptyParts);

You can do whatever you like with the words in the tokens list.

Nejat
  • 31,784
  • 12
  • 106
  • 138