Lecture 13 Outline (October 23, 2015)
Reading
:
text
, §8.1–8.4
Greetings and felicitations!
String library functions
Prototypes in include file
string.h
String length:
strlen(str)
String copy:
strcpy(dest, src)
;
strncpy(dest, src, number_chars)
String catenation:
strcat(dest, src)
;
strncat(dest, src, number_chars)
String comparison:
strcmp(dest, src)
;
strncmp(dest, src, number_chars)
String tokenization:
strtok(src, delim)
; program
strtok.c
You can also obtain a PDF version of this.
Version of October 28, 2015 at 1:40PM