The String object represents a string value. 更多...
import 语句: | import QtQml 2.2 |
The QML String object extends the JS String object with the arg() 函数。
另请参阅 ECMAScript 语言规范 .
string arg ( value ) |
Returns a copy of this string with the lowest numbered place marker replaced by value , i.e., %1, %2, ..., %99. The following example prints "There are 20 items":
var message = "There are %1 items" var count = 20 console.log(message.arg(count))