-2

How can I replace a letter from one array to the letter from the other? And vice versa. For example a <-> x, b <-> y, c <-> z.

Code in C++ , please

txtText->setText(txtText->toPlainText().replace(prep[a],QString("x")));
txtText->setText(txtText->toPlainText().replace(prep[b],QString("y")));
txtText->setText(txtText->toPlainText().replace(prep[c],QString("z")));

or how? I don't understand

juanchopanza
  • 223,364
  • 34
  • 402
  • 480
Andrew
  • 1

1 Answers1

2

QString::replace is probably what you need.

user2448027
  • 1,628
  • 10
  • 11