Numworks Epsilon
1.4.1
Graphing Calculator Operating System
strlcpy.c
Go to the documentation of this file.
1
#include <
quiz.h
>
2
#include <string.h>
3
#include <
assert.h
>
4
5
QUIZ_CASE
(liba_strlcpy) {
6
char
* t =
"Hello"
;
7
char
buffer[16];
8
size_t
result =
strlcpy
(buffer, t, 2);
9
assert
(result == 1);
10
assert
(buffer[0] ==
'H'
);
11
assert
(buffer[1] ==
NULL
);
12
}
assert
#define assert(e)
Definition:
assert.h:9
assert.h
strlcpy
size_t strlcpy(char *dst, const char *src, size_t len)
Definition:
strlcpy.c:3
NULL
#define NULL
Definition:
stddef.h:4
quiz.h
QUIZ_CASE
QUIZ_CASE(liba_strlcpy)
Definition:
strlcpy.c:5
epsilon
liba
test
strlcpy.c
Generated by
1.8.14