cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
extracting a string between two patterns
extracting a string between two patterns
Jan 24, 2016 at 3:50pm UTC
aliyesami
(57)
I have a 100 chars wide string with few '\n' characters, I want to extract the string between the first and the second '\n'.
how can I do it without using streams or vectors as I am using AVR GCC .
Jan 24, 2016 at 4:22pm UTC
cire
(8284)
This is an extremely simple programming exercise. Give it a shot.
Jan 25, 2016 at 9:33am UTC
Thomas1965
(4571)
strchr is what you need.
http://www.cplusplus.com/reference/cstring/strchr/
EDIT
Easier would actually be strtok.
http://www.cplusplus.com/reference/cstring/strtok/
Last edited on
Jan 25, 2016 at 11:53am UTC
Topic archived. No new replies allowed.