Download C - Oracle Documentation
Transcript
C void numtos(unsigned long num, char *s); numtos(9F) converts the integer num to an ASCII decimal string and copies the string to the location pointed to by s. The driver must provide the storage for the string s and assure that it can contain the result. char *strchr(const char *str, int chr); strchr(9F) returns a pointer to the first occurrence of the character chr in the string pointed to by str, or NULL, if chr is not found in the string. int strcmp(const char *s1, const char *s2); strcmp(9F) compares two null-terminated character strings. It returns zero if they are identical; otherwise, it returns a non-zero value. int strncmp(const char *s1, const char *s2, size_t n); strncmp(9F) compares the first n characters of the two strings. It returns zero if these characters are identical; otherwise, it returns a non-zero value. char *strcpy(char *dst, const char *srs); strcpy(9F) copies the character string pointed to by srs to the location pointed to by dst. The driver must provide storage for the string dst and assure that it is long enough. char *strncpy(char *dst, const char *srs, size_t n); strncpy(9F) copies n characters from the string pointed to by srs to the string pointed to by dst. The driver must provide storage for the string dst and assure that it is long enough. size_t strlen(const char *sp); strlen(9F) returns the length of the character string pointed to by sp, not including the null-termination character. Summary of Solaris 2.4 DDI/DKI Services 345