MicrOS
strstr.c File Reference
#include "../string.h"

Functions

int compare (const char *X, const char *Y)
 
char * strstr (const char *str1, const char *str2)
 Locate substring. More...
 

Function Documentation

◆ compare()

int compare ( const char *  X,
const char *  Y 
)

◆ strstr()

char* strstr ( const char *  str1,
const char *  str2 
)

Locate substring.

Returns a pointer to the first occurrence of str2 in str1, or a null pointer if str2 is not part of str1.

Parameters
str1C string to be scanned.
str2C string containing the characters to match.
Returns
A pointer to the first occurrence in str1 of the entire sequence of characters specified in str2, or a null pointer if the sequence is not present in str1.