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 - OccurrencesOf Method
Find the number times the variable occurs in the string
Member of String Intrinsic Functions (PRIM_LIBI.ICommonStringIntrinsics)

Parameters

Name

Type

Data Type

Description

Result

*Result (Optional)

Integer

Number of occurrences

String

*Input

String

String to search for

StartPosition

*Input (Optional)

Integer

Position 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

  • No labels