System.AnsiStringT.Pos

From RAD Studio API Documentation
Jump to: navigation, search

C++

int Pos(const AnsiStringT& subStr) const {

Properties

Type Visibility Source Unit Parent
function public dstring.h System AnsiStringT

Description

Returns the index at which a specified substring begins.

Pos returns the index in the AnsiStringT at which the substring subStr begins, where 1 is the index of the first character, 2 is the index of the second character, and so on. If the substring is not contained in the AnsiStringT, Pos returns 0.