isascii

This function determines whether the provided value is of type str and contains only valid ascii characters.

This function does not generate an event.

Function

isascii(value)

Arguments

Argument Type Description
value any (required) The value to be tested.

Return value

Returns true if the given value is of type str and contains only ascii characters, else false.

Example

This code shows some return values for isascii():

[
    isascii( 'ԉ' ),
    isascii( 'pi' ),
];

Return value in JSON format

[
    false,
    true
]