QString s = "hello world"; s. indexOf ( "o" )); //4 s. lastIndexOf ( "o" )); //7 转载于:https://www.cnblogs.com/FKdelphi/p/10310160.html