Table of Content
HAL Forum
function Boolean CharacterMatch (
string text,string character,integer position)
Description:
Checks whether character in specified position of string is equal to some other character.
Parameters:
text String.
character Character to test.
position Position in string.
function
boolean CheckDigitMatch(string tstr, integer i)
begin
  boolean res;
  
  res = false;
  if (CharacterMatch(tstr, "9", i) or CharacterMatch(tstr, "8", i) or CharacterMatch(tstr, "7", i) or CharacterMatch(tstr, "6", i) or
      CharacterMatch(tstr, "5", i) or CharacterMatch(tstr, "4", i) or CharacterMatch(tstr, "3", i) or CharacterMatch(tstr, "2", i) or
      CharacterMatch(tstr, "1", i) or CharacterMatch(tstr, "0", i)) then 
  begin
    res = true;
  end;    
  CheckDigitMatch = res;
  return;
end; 
Related topics:
««