System.SysUtils.ElementToCharIndex

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

extern DELPHI_PACKAGE int __fastcall ElementToCharIndex _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (const System::AnsiString S, int Index)/* overload */;

Properties

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

Description

Warning: The ANSI version of ElementToCharIndex is deprecated. Please use the AnsiStrings unit.

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