COUNT-LEADING Function

The COUNT-LEADING function returns the number of consecutive times that a character appears at the beginning of a string. The type of this function is integer.

Usage

FUNCTION COUNT-LEADING (argument-1, [argument-2])

Parameters

argument-1 Must be alphanumeric.
argument-2 Must be alphanumeric
  1. argument-1 represents the string that is to be interrogated.
  2. argument-2 represents the character to be counted at the start of argument-1. Only the first character of argument-2 is used; if omitted, the function assumes a space as argument-2.

Returned Value

The returned value is the number of times that argument-2 appears at the start of argument-1.