Suche funktion die einen string nach einem unterstring durchsucht.
-
Suche funktion die einen string nach einem unterstring durchsucht.
zB:
char str1[]="Das ist ein String.";
char substr[]= "ein";Mit welcher Funktion kann ich feststellen ob substr in str1 vorhanden ist, bzw an welcher position?
Da gibt es doch bestimmt solch eine funktion in ANSI C. oder muss man das etwa per hand machen?
-
-
-
Note that strstr is bad function: it stores state of parsing in static variable. If your code uses threads, get alternative implementation.
-
RoboTact schrieb:
Note that strstr is bad function: it stores state of parsing in static variable. If your code uses threads, get alternative implementation.
Do you confuse strstr() with strtok() rigth now?
-
TactX schrieb:
Do you confuse strstr() with strtok() rigth now?
I do.
-