string str = "str"; int index = str.IndexOf("s"); //index = 0 //https://learn.microsoft.com/en-us/dotnet/api/system.string.indexof?view=net-6.0