DelphiDabbler Code Snippets Database

Snippet Selection

The following snippets from the Code Snippets Database have been requested.

IsASCIIChar

Checks if the given character is a valid ASCII character.

function IsASCIIChar(const Ch: Char): Boolean;
begin
  Result := Ord(Ch) <= $7F;
end;

IsASCIIDigit

Checks if the given character is a digit in the ASCII character set.

function IsASCIIDigit(const Ch: Char): Boolean;
begin
  Result := Ord(Ch) in [Ord('0')..Ord('9')];
end;

View the whole database.

Go to the DelphiDabbler website.