Show: Object Pascal C++
Display Preferences

System.SysUtils.AnsiPos

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function AnsiPos(const Substr, S: string): Integer;

C++

extern DELPHI_PACKAGE int __fastcall AnsiPos(const System::UnicodeString Substr, const System::UnicodeString S)/* overload */;

Properties

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

Description

Locates the position of a substring.

Call AnsiPos to obtain the byte offset of the Substr parameter, as it appears in the string S. For example, if Substr is the string "AB", and S is the string "ABCDE", AnsiPos returns 1. If Substr does not appear in S, AnsiPos returns 0.

Note: This function supports multi-byte character sets (MBCS).

See Also

Personal tools
Translations