System.AnsiStrings.ElementToCharIndex

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ElementToCharIndex(const S: AnsiString; Index: Integer): Integer;

C++

extern DELPHI_PACKAGE int __fastcall ElementToCharIndex(const System::AnsiString S, int Index)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.AnsiStrings.pas
System.AnsiStrings.hpp
System.AnsiStrings System.AnsiStrings

Description

Returns the position of the character that contains a specified element in a string.

Call ElementToCharIndex to determine which character contains a particular element in a string, where 1 specifies the first element, 2 specifies the second element, and so on. If the Index parameter specifies an element that is not in the string (Index < 0 or Index > Length(S)), ElementToCharIndex returns 0.

See Also