strspnΒΆ

strspn returns the index of the first character in smString1 that does not belong to the set of characters in ssString2.

smIndex = strspn(smString1, ssString2)

Return Value

smIndex is a matrix with the same dimension as smString1. Each element is the index of the first character in smString1 that does not belong to the set of characters in ssString2. The index starts with 1. If all characters in smString1 belong to the set of characters in ssString2, the function return 0.

Parameters

smString1

smString1 is a string matrix.

ssString2

ssString2 is a scalar string.

id-1212479