toString

[ Function ]

public static toString(
    value: any | null | undefined ,
    defaultValue: string | null = null
): string | null;

Converts any compatible value to a string.

Parameter

Name

Type

Description

value

any

The value to convert.

defaultValue

string, null

This value is returned if the first parameter cannot be converted. Null applies if this parameter is not passed.

Return value

Type

Description

string, null

Returns the string value or null in the event of an error.

toString 1:

Available from 1.8