Search for a character array within another.
Compatibility:This function is compatible with the following targets:
|
|
#include <string.h>
char *strstr(const char *s1, const char *s2);Parameters:
Parameters for this facility are:
Both s1 and s2 must point to null terminated ('\0') character arrays.
#include <string.h>
#include <stdio.h>
int main(void)
{
static char s1[] = "tomato carrot onion";
static char s2[] = "on";
puts(strstr(s1, s2));
return 0;
}
Output:
onion
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 16, 2000