Sign in Join
FPDoc Onlineexperiment

TStringReplaceAlgorithm enumeration

In unit StrUtils

Algorithm to use in StringReplace.

Declaration

pascal
TStringReplaceAlgorithm = (sraDefault,sraManySmall,sraBoyerMoore)

Description

TStringReplaceAlgorithm enumerates the available algorithms to StringReplace

sraDefault

Use the sysutils algorithm, which does a straightforward linear search and replace.

sraManySmall

Use an approach which is suitable for a string with many occurrences of the same small text.

sraBoyerMoore

Use a Boyer-Moore search algorithm.

Depending on the kind of data that is being treated, one or the other of these algorithms may produce faster results.

See also

Values

sraDefaultUse the sysutils algorithm, which does a straightforward linear search and replace.
sraManySmallUse an approach which is suitable for a string with many occurrences of the same small text.
sraBoyerMooreUse a Boyer-Moore search algorithm.

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