This function determines whether the provided value is of type str and contains only valid ascii characters.
This function does not generate a change.
is_ascii(value)
Argument | Type | Description |
---|---|---|
value | any (required) | The value to be tested. |
Returns true
if the given value is of type str
and contains only ascii characters, else false
.
This code shows some return values for is_ascii():
[
is_ascii( 'ԉ' ),
is_ascii( 'pi' ),
];
Return value in JSON format
[
false,
true
]