Str_Str()

Finds the first occurrence of a specific string within another string.

Files

lib_str.h/lib_str.c

Prototype

          CPU_CHAR  *Str_Str (const  CPU_CHAR  *pstr,
                              const  CPU_CHAR  *pstr_srch);

Arguments

pstr

Pointer to the string to search for the specified string.

pstr_srch

Pointer to the string to search for in the string.

Returned Value

Pointer to first occurrence of search string in string, if specified string found in search string and no errors.

Pointer to search string, if specified string is zero-length NULL-string.

Pointer to NULL, otherwise.

Required Configuration

None.

Notes / Warnings

String buffers not modified.

String search terminates if string pointer points to or overlaps the NULL address.

Example Usage

          CPU_CHAR  *pstr;


          pstr = Str_Str("Hello World!", "lo");