[Overview][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'LazUTF8' (#lazutils)

UTF8Pos

Returns the character index where the search text starts in the string.

Declaration

Source position: lazutf8.pas line 112

function UTF8Pos(

  const SearchForText: string;

  const SearchInText: string;

  StartPos: SizeInt = 1

):PtrInt;

Arguments

SearchForText

  

Value to locate in the string.

SearchInText

  

String to search for the specified value.

Function result

Character position where the search text was located.

Description

Returns the character index where SearchForText starts in SearchInText. An optional StartPos can be given to start searching at a given character index. StartPos starts at 1.

Returns 0 if the search text is not found in the string.


Version 3.2 Generated 2024-02-25 Home