Versions Compared

Key

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

...

lib_str.h/lib_str.c

Prototype

Code Block
LanguageC++
CaptionTextCAPTION
languagecpp
          CPU_CHAR  *Str_Cat (       CPU_CHAR  *pstr_dest,
                              const  CPU_CHAR  *pstr_cat);


Arguments

pstr_dest

Pointer to the string memory buffer to append string characters into.

...

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

Example Usage

CAPTION
Code Block
LanguageC++
CaptionText
languagecpp
          CPU_CHAR     AppBuf[30];
          CPU_CHAR    *pstr;
         


          pstr = Str_Copy(&AppBuf[0], "Hello World!");
          if (pstr != (CPU_CHAR *)0) {
              pstr = Str_Cat(&AppBuf[0], "Goodbye World!");
          }
           
          if (pstr == (CPU_CHAR *)0) {
              printf("STRING COPY/CONCATENATION FAILED!");
          }