NPos

Returns the position of the N-th occurrence of a substring in a string.

Declaration

Source position: strutils.pp line 177

  function NPos(const C: string; S: string; N: Integer) : SizeInt;

Description

NPos checks S for the position of the N-th occurrence of C. If C occurs less than N times in S, or does not occur in S at all, 0 is returned. If N is less than 1, zero is returned.

Errors

None.

See also

Name Description
FindPart Search for a substring in a string, using wildcards.
WordPosition Search position of Nth word in a string.

results matching ""

    No results matching ""