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.

strncmp returns an integer greater than, equal to, or less than zero, if the possibly nullterminatedarray pointed to by s1 is greater than, equal to, or less than the possiblynull-terminated array pointed to by s2.Portabilitystrncmp con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).strncpySynopsisDescriptionPortability#include char *strncpy(char *s1, const char *s2, size_t n);strncpy copies not more than n characters from the array pointed to by s2 to the arraypointed to by s1. Characters that follow a null character in s1 are not copied. Thebehaviour of strncpy is undefined if copying takes place between objects that overlap.If the array pointed to by s2 is a string that is shorter than n characters, null charactersare appended to the copy in the array pointed to by s1, until n characters in all havebeen written.strncpy returns the value of s1.strncpy con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).strpbrkSynopsisDescription#include char *strpbrk(const char *s1, const char *s2);strpbrk locates the first occurrence in the string pointed to by s1 of any character fromthe string pointed to by s2.strpbrk returns a pointer to the character, or a null pointer if no character from s2occurs in s1.Portabilitystrpbrk con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).strrchrSynopsisDescription#include char *strrchr(const char *s, int c);strrchr locates the last occurrence of c (converted to a char) in the string pointed to bys. The terminating null character is considered to be part of the string.strrchr returns a pointer to the character, or a null pointer if c does not occur in thestring.316 Chapter 28 Standard C Library Reference

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

Saved successfully!

Ooh no, something went wrong!