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 character in a string.

Files

lib_str.h/lib_str.c

Prototype

          CPU_CHAR  *Str_Char (const  CPU_CHAR  *pstr,
                                      CPU_CHAR   srch_char);

Arguments

pstr

Pointer to the string to search for the specified character.

srch_char

Character to search for in the string.

Returned Value

Pointer to first occurrence of character in string, if no errors;

Pointer to NULL, otherwise.

Required Configuration

None.

Notes / Warnings

String buffer not modified.

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

Example Usage

          CPU_CHAR  *pstr;
           
          pstr = Str_Char("Hello World!", 'l');
  • No labels