Sign in
llvm
/
llvm-archive
/
f91d1660b4827134c7666ae9637f21a2741d183f
/
.
/
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
;
}