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