Sign in
llvm
/
llvm-archive
/
f8b4f79771a41ee0a0f02ac90619d37ccd834915
/
.
/
safecode
/
test
/
cstdlib
/
strcspn-002.c
blob: 8b803f0cda9a31bf54a541d555fdefd8b2a6fd26 [
file
] [
log
] [
blame
]
// RUN: test.sh -p -t %t %s
#include
<assert.h>
#include
<string.h>
// Example of the correct usage of strcspn().
int
main
()
{
char
*
str
=
"A string"
;
size_t
result
;
result
=
strspn
(
str
,
"B"
);
assert
(
result
=
8
);
return
0
;
}