JCL Help:StrSearch@AnsiString@AnsiString@SizeInt

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Returns the index of the first character in a specified sub-string that occurs in a given string.


Pascal

 function StrSearch(const Substr: string; const S: string; const Index: SizeInt = 1): SizeInt;
function StrSearch(const Substr: AnsiString; const S: AnsiString; const Index: SizeInt = 1): SizeInt;


Parameters

Parameters Description
const Substr: string The sub-string to search for.
const Index: SizeInt = 1 The index in Str at which to start the search.
Str The string in which to search.


Return Value

One-based index of the first character of SubStr in Str or 0 if SubStr does not occur in the supplied string.


Description

StrSearch returns the index of the first character in a specified sub-string that occurs in a given string. The search starts at the supplied index and is case-sensitive.


See Also

StrFind


About

Unit

JclAnsiStrings


Donator

Azret Botash


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page