How do I remove trailing whitespace from a QString?

前端 未结 9 1806
甜味超标
甜味超标 2020-12-29 19:24

I want to remove all the trailing whitespace characters in a QString. I am looking to do what the Python function str.rstrip() with a QString

9条回答
  •  滥情空心
    2020-12-29 19:57

    QString::Trimmed() removes whitespace from the start and the end - if you are sure there is no whitespace at the start you can use this.

提交回复
热议问题