Skip to content

IndexChar0

Return index of a character in null-terminated array of char.

Declaration

Source position: systemh.inc line 885

  function IndexChar0(const buf; len: SizeInt; b: Char) : SizeInt;

Description

IndexChar0 returns the index of the character b in the null-terminated array Buf. At most len characters will be searched, or the null character if it is encountered first. If the character is not found, -1 is returned.

Errors

On error, -1 is returned.

See also

Name Description
CompareChar0 Compare two buffers character by character till a null-character is reached.
IndexByte Search for a byte in a memory range.
IndexChar Search for a character in a memory range.
IndexDWord Search for a DWord value in a memory range.
IndexWord Search for a WORD value in a memory range.