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.
FUNCTION COUNT-LEADING (argument-1, [argument-2])
|argument-1||Must be alphanumeric.|
|argument-2||Must be alphanumeric|
The returned value is the number of times that argument-2 appears at the start of argument-1.