Table of Contents

TTMSFNCUtils.VarPos Method

Finds the first occurrence of ASubValue in AValue and stores the 1-based position in AResult.

API unit family: TMSFNCUtils Declaring type: TTMSFNCUtils

Syntax

class function VarPos(ASubValue, AValue: string; var AResult: Integer): Integer;

Parameters

Name Description
ASubValue Substring to search for.
AValue String to search within.
AResult Receives the 1-based character index of the match, or 0 if not found.

Returns

The 1-based position of the match, or 0 if not found.