Pillars of Eternity Wiki
Pillars of Eternity Wiki
Template-info.png Template documentation

Returns how many times the string {{{2|}}} (default is a single space, i.e. " " without the quotes) appears in string {{{1|}}}.

Usage

{{count|string|match}}

or

{{count|string}} (to default to amount of spaces in string)

Examples

{{Count|A B C D}} 3
{{Count|the quick brown fox jumped over the lazy dog|the}} 2

Notes

  • Both parameters are case sensitive. Use {{lc:somestring}} to force either parameter to lower case to make this template case insensitive.
  • If the match string is used as a separator, you must add 1 to get the number of separated items/terms/parameters;
  • If the match string is used as a terminator, you get the number of terminated items/terms/parameters.