[Overview][Procedures and functions][Index] Reference for unit 'LazUTF16' (#lazutils)

Utf16StringReplace

Replaces a pattern in a Unicode string with another Unicode pattern.

Declaration

Source position: lazutf16.pas line 48

function Utf16StringReplace(

  const S: WideString;

  const OldPattern: WideString;

  const NewPattern: WideString;

  Flags: TReplaceFlags

):WideString;

function Utf16StringReplace(

  const S: WideString;

  const OldPattern: WideString;

  const NewPattern: WideString;

  Flags: TReplaceFlags;

  out Count: Integer

):WideString;

Arguments

S

  

Unicode string value examined in the routine.

OldPattern

  

Unicode string with the pattern to locate in S.

NewPattern

  

Unicode string with the pattern used to replace the old pattern in S.

Flags

  

Set of replacement flags applied in the routine.

Function result

Updated value for Unicode string after pattern replacement(s).

Arguments

S

  

Unicode string value examined in the routine.

OldPattern

  

Unicode string with the pattern to locate in S.

NewPattern

  

Unicode string with the pattern used to replace the old pattern in S.

Flags

  

Set of replacement flags applied in the routine.

Count

  

Number of replacements performed in the routine.

Description

Same as SysUtil.StringReplace but for WideStrings and UnicodeStrings, since it is not available in FPC yet.

See also

StringReplace

TReplaceFlags


Version 3.2 Generated 2024-02-25 Home