strfindΒΆ

strfind searches for the occurence of a substring in a scalar string.

rvPositions = strfind(ssString, ssFind)

Return Value

rvPositions is a vector with the positions of the first character of ssFind in ssString. If the find string is not found, the function returns 0.

Parameters

ssString

ssString is a scalar string.

ssFind

ssFind is a scalar string.

Example

strfind("This is not a string", "is")
3  6

id-1472647