count function

This 2021.0 documentation has been archived and is no longer updated. Content and links may be outdated. See the latest documentation.

Syntax

  • float count(inputString, matchString)

Parameters

  1. inputStringstring
  2. matchStringstring

Returns

Number of matches of matchString in inputString.

Description

The count function returns the number of matches of the matchString in the inputString.

Related

Examples

count("cityengine", "e")
# result = 2
count("cityengine rocks my world; cityengine should rock yours too", "cityengine")
# result = 2

In this topic