Skip to main content

charFrequency (Function)

Gives the frequency of a char in input string.

Syntax

<LONG> str:charFrequency(<STRING> input.string, <STRING> char)

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
input.stringThe input string to be processed.STRINGNoYes
charThe char's number of occurrences to be calculatedSTRINGNoYes

Example 1

str:charFrequency("gdn,ABM,NSFT", ",")

This counts the number of occurrences of , in the given input.string. In this scenario, the output will is 2.