Qt 5.9 | Qt QML | QML Types | String QML Type

Qt 5.9.9 Reference Documentation

# String QML Type

The String object represents a string value More...

Import Statement: | import QtQml 2.2

- List of all members, including inherited members

## Methods

- string arg(value)

## Detailed Description

The QML String object extends the JS String object with the arg() function.

See also ECMAScript Language Specification.

## Method Documentation

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))