You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

String Intrinsic Functions - OccurrencesIn Method
Find the number times the string occurs in a variable
Member of String Intrinsic Functions (PRIM_LIBI.ICommonStringIntrinsics)

Parameters

Name

Type

Data Type

Description

Result

*Result (Optional)

Integer

Resulting number

String

*Input

String

String to be searched

StartPosition

*Input (Optional)

Integer

Position at which to start searching

Details


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

Example


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

See also

All Component Classes
Technical Reference

  • No labels