.Maui Blog

VB.Net – Count substring occurrences in a string

The simplest way

Dim text = ".Maui is awesome"
Dim count = text.Split("a").Length -1 
Exit mobile version