Using Case Statement with String

In Jcl library you have the StrIndex function StrIndex(Index, Array Of String) which works like this:

Case StrIndex('SomeName', ['bobby', 'tommy', 'somename']) of 
  0: ..code.. ;//bobby
  1: ..code..;//tommy
  2: ..code..;//somename
else
  ShowMessage('error');
end.

Leave a Comment