Sign in Join
FPDoc Onlineexperiment

UTF8Pos function

In unit LazUTF8

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

Declaration

pascal
function UTF8Pos(const SearchForText: string; 
 const SearchInText: string; StartPos: SizeInt=1)
: PtrInt

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.

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.