Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
ed420924
Commit
ed420924
authored
Dec 10, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add strtok_r.c
parent
e842d711
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
strtok_r.c
common/strtok_r.c
+35
-0
No files found.
common/strtok_r.c
0 → 100644
View file @
ed420924
/*
* public domain strtok_r()
*/
#include <string.h>
char
*
strtok_r
(
char
*
str
,
const
char
*
delim
,
char
**
nextp
)
{
char
*
ret
;
if
(
str
==
NULL
)
{
str
=
*
nextp
;
}
str
+=
strspn
(
str
,
delim
);
if
(
*
str
==
'\0'
)
{
return
NULL
;
}
ret
=
str
;
str
+=
strcspn
(
str
,
delim
);
if
(
*
str
)
{
*
str
++
=
'\0'
;
}
*
nextp
=
str
;
return
ret
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment