Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2018-10

Re: any free pascal standard function to compare a, string against an array of string?

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ingemar Ragnemalm

You mean something faster than a for-loop? Like a hash table?

I don't know of any hash table in the standard library but there are some in the class library:

https://www.freepascal.org/docs-html/fcl/contnrs/tfpstringhashtable.html https://www.freepascal.org/docs-html/fcl/contnrs/tfphashlist.html

I have not used these myself but they may suit your problem.

Or you can just write your own hash table function. It is not that hard.

/Ingemar

Den 2018-10-10 kl. 17:31, skrev

Show quoted text 9 lines
is there a function like   if    IsOneOf('subtext', ['abc','cde','fecg','hig'])   then begin ... end; is there such a function IsOneOf(TheSubString : String; const TheStrings : array of String) : Boolean ? if yes, what is its name and unit?

Reply by email