StringExtensions.Count(String, Char) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Counts the number of occurrences of a given character into a target String instance.
public static int Count (this string text, char c);
static member Count : string * char -> int
<Extension()>
Public Function Count (text As String, c As Char) As Integer
Parameters
- c
- Char
The character to look for.
Returns
The number of occurrences of c
in text
.