CodePointPos function
Gets the position where the search value is found in a string.
Declaration
function CodePointPos(const SearchForText: string;
const SearchInText: string; StartPos: NativeInt=1)
: NativeIntArguments
SearchForText | Values to locate in the string. |
SearchInText | String to search for the specified values. |
StartPos | Initial character position (codepoint) used in the comparison. |
Function result
Character position (codepoint) where the search value was found in the string.
Description
Gets the position in SearchInText where SearchForText is found. StartPos indicates the initial character position (codepoint) in SearchInText used for the comparison. The default value is 1.
The return value contains the character position (codepoint) where the search value was found. The return value is 0 (zero) if SearchForText is not found in the string. For platforms that require UTF-16, UTF16Pos is called to get the return value. For other platforms, UTF8Pos is called to get the character position (codepoint).
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
