String.NInStr (gb)

Static Function NInStr ( String As String, Pattern As String [ , Mode As Integer ] ) As Integer

Since 3.21

Returns the number of occurrences of Pattern in String.

If the substring is not found, this function returns zero.

Mode can be set to gb.IgnoreCase for a case insensitive comparison.

Examples

PRINT String.NInStr("Éternelle divinité", "é")
1

PRINT String.NInStr("Éternelle divinité", "é", gb.IgnoreCase)
2