CAPL Script

MbStrStr

Syntax

long mbstrstr(char s1[], char s2[]);

long mbstrstr_off(char s1[], long offset, char s2[]);

Function

Searches ins1fors2.

Parameters

s1 First string

s2

Second string

offset

Offset in s1 incharactersat which the search shall be started

Return Values

First position in characters ofs2ins1, or -1 ifs2is not found ins1.

long pos;char s[50] = "'Tür' is german for 'door'";pos = mbstrstr(s, "german");write("%d", pos); // 9

strstr | mbstrlen | mbstrncpy | strncat