11.07.2015 Views

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

strerrorSynopsisDescriptionPortability#include char *strerror(int errnum);strerror maps the number in errnum to a message string. Typically, the values <strong>for</strong>errnum come from errno, but strerror can map any value of type int to a message.strerror returns a pointer to the message string.The program must not modify the returned message string. The message may beoverwritten by a subsequent call to strerror.strerror con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).strlenSynopsisDescriptionPortability#include size_t strlen(const char *s);strlen returns the length of the string pointed to by s, that is the number of charactersthat precede the terminating null character.strlen con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).strncatSynopsisDescriptionPortability#include char *strncat(char *s1, const char *s2, size_t n);strncat appends not more than n characters from the array pointed to by s2 to the endof the string pointed to by s1. A null character in s1 and characters that follow it are notappended. The initial character of s2 overwrites the null character at the end of s1. Aterminating null character is always appended to the result. The behaviour of strncatis undefined if copying takes place between objects that overlap.strncat returns the value of s1.strncat con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).strncmpSynopsisDescription#include int strncmp(const char *s1, const char *s2, size_t n);strncmp compares not more than n characters from the array pointed to by s1 to thearray pointed to by s2. Characters that follow a null character are not compared.Chapter 28 - String handling315

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!