Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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");
  • No labels