Compatible Unicode Intrinsic Functions - OccurrencesOf Method

OccurrencesOf method

Member of Compatible Unicode Intrinsic Functions (PRIM_LIBI.ICompatibleUnicodeIntrinsics)

Parameters

NameTypeData TypeDescription
Result*Result (Optional)IntegerNumber of occurrences
String*InputUnicode StringString to search for
StartPosition*Input (Optional)IntegerPosition at which to start searching

Details

OccurencesOf returns the number of times the string supplied in the String parameter can be found in a string, starting from the character specified in the Startposition parameter.
 
OccurrencesOf is case sensitive.

Example

In this example, if #String contained "ABCDEABCDEABCDE", the result would be 3
#Occurences := #String.OccurencesOf( "ABC" )

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2