Skip to content

TStringReplaceAlgorithm

Algorithm to use in StringReplace.

Declaration

Source position: strutils.pp line 297

type
  TStringReplaceAlgorithm = (sraDefault,sraManySmall,sraBoyerMoore)

Values

Value Description
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.

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

Name Description
StringReplace Optimized search-and-replace algorithm.