coerce.to-string

coerce.to-string attempts to coerce an unknown datum to String type. It is a flexible method, and will attempt to take any primitive data type and encode it as a string.

Function category: Coercion

Syntax

coerce.to-string(arg1)

Arguments

Description

arg1

Any datum.

Examples

Example 1: Primitive data type to string

If given a boolean, it will return its string value.

coerce.to-string(true) = "true"

Example 2: Integer to string

If given the integer argument, it will return a string value.

coerce.to-string(1.1) = "1.1"

Notes