跳转至主要内容
CloudStudio

ToString

The ToString function converts a value of any type to string.

Definition

ToString(valor)

参数

名称说明Data type
valorValue to convert to string. If the value is boolean, 'true' will be returned when the value is true, and 'false' when the value is false. If the value is numeric, it will be converted to string, always using a period to separate decimal places, if any. If the value is already a string, it will be returned unchanged.any

Numeric to string conversion example

In this example, a numeric ex按下ion is converted to a string.

ToString(10 / 4)

The result will be '2.5' (string)

Boolean to string conversion example

In this example, a boolean ex按下ion is converted to a string.

ToString(20 < 100)

The result will be 'true' (string)

最后更新于

本页内容