[Overview][Resource strings][Constants][Types][Procedures and functions][Index] Reference for unit 'StrUtils' (#rtl)

TStringReplaceAlgorithm

Algorithm to use in StringReplace

Declaration

Source position: strutils.pp line 269

type TStringReplaceAlgorithm = (

  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

StringReplace

  

Optimized search-and-replace algorithm


Documentation generated on: May 14 2021