repo.or.cz
/
kugel-rb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Move paths.[ch] to firmware
[kugel-rb.git]
/
apps
/
plugins
/
lua
/
strcspn.c
blob
7af6f693ebd5005d788253de36e85ccc9dfd25c2
1
#include
"rocklibc.h"
2
3
size_t
strcspn
(
const char
*
s
,
const char
*
reject
)
4
{
5
size_t
l
=
0
;
6
int
a
=
1
,
i
,
al
=
strlen
(
reject
);
7
8
while
((
a
)&&(*
s
))
9
{
10
for
(
i
=
0
;(
a
)&&(
i
<
al
);
i
++)
11
if
(*
s
==
reject
[
i
])
a
=
0
;
12
if
(
a
)
l
++;
13
s
++;
14
}
15
return
l
;
16
}