Parsing a string on a newline
- Dominant language
- C++
- Stars
- 39
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
How do I use this library to parse a response:
```
AT+CSGN\r\n
014532000023453\r\n
OK\r\n
```
I have tried
```c++
_parser.send("AT+CGSN")
&& _parser.recv("AT+CGSN\r\n%s\r\nOK",_deviceStatus.imei);
```
and various other combinations and I can only get it to parse to the 0 then stop.
```
AT> AT+CGSN
AT<
AT= AT+CGSN
AT<
AT= 0
AT< 14532000023453
AT<
AT= OK
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the response and the _parser.send(...).recv(...) call shown in the issue, then read the parser's receive-format handling and any documented examples or tests available in the repository. Done means the full IMEI response, including the lines ending in \r\n and the final OK, is parsed rather than stopping at 0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100