MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / parse_simple_string

Function parse_simple_string

nodedb/src/control/server/resp/codec.rs:235–243  ·  view source on GitHub ↗
(buf: &[u8])

Source from the content-addressed store, hash-verified

233}
234
235fn parse_simple_string(buf: &[u8]) -> io::Result<Option<(String, usize)>> {
236 match find_crlf(buf) {
237 Some(pos) => {
238 let s = String::from_utf8_lossy(&buf[..pos]).into_owned();
239 Ok(Some((s, pos + 2)))
240 }
241 None => Ok(None),
242 }
243}
244
245fn parse_integer(buf: &[u8]) -> io::Result<Option<(i64, usize)>> {
246 match find_crlf(buf) {

Callers 1

parse_valueFunction · 0.85

Calls 1

find_crlfFunction · 0.85

Tested by

no test coverage detected