function CountChar(const C: Char): Integer;
The number of occurrences of C in the window.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | C | Char |
Returns: Integer
Examples
Counting a character.
uses Substr;
procedure Example;
begin
Assert(Substring('banana').CountChar('a') = 3);
end;