Falls index angegeben wird, beginnt die Suche an dieser Position. Negative Werte werden vom Ende des Strings her gezählt.
Beispiel
string s1 = "This is a string", s2 = "is a"; int pos = strstr(s1, s2); if (pos >= 0) printf("The substring starts at %d\n", pos); else printf("The substring was not found\n");
Index | Copyright © 2005 CadSoft Computer GmbH |