Sign in Join
FPDoc Onlineexperiment

IsAscii function

In unit LazUTF8

Returns True when the specified string contains only single-byte ASCII characters.

Declaration

pascal
function IsAscii(S: string): Boolean

Arguments

S

String with the characters examined in the routine.

Function result

Returns True if the specified string contains characters with ASCII single-byte values.

Description

IsAscii is Boolean function used to determine whether all of the characters in the specified string are single-byte ASCII values. ASCII characters are those with an ordinal value less than or equal to $7F (Decimal 127).

S is the string value with the characters examined in the routine. IsAscii examines each of the bytes values in S, and returns False is any byte has an ordinal value > $7F. Otherwise, the return value is True.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.