Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

lib_str.h/lib_str.c

Prototype

Code Block
languagecpp
          CPU_INT32U  Str_ParseNbr_Int32U (const  CPU_CHAR     *pstr,
                                                  CPU_CHAR    **pstr_next,
                                                  CPU_INT08U    nbr_base);


Arguments

pstr

Pointer to string.

...

pstr = " -12345678901234567890*123456"
nbr_base = 10
nbr = 0
pstr_next = pstr = " -12345678901234567890*123456"

Example Usage

Code Block
languagecpp
          CPU_INT32U   nbr;
          CPU_CHAR    *pstr_end;


          nbr = Str_ParseNbr_Int32U((CPU_CHAR  *)"01234534*-23434>345344",
                                    (CPU_CHAR **)&pstr_end,
                                    (CPU_INT08U ) 10u);