pub fn split_line(line: &str) -> Option<(String, String)>Expand description
Split a line into a header name and a value.
The rules, from SPEC.md 4.3 and src/tcp_server.cpp:604-616:
- A line with no colon is ignored.
- A semicolon starts a comment. The parser removes it and the rest.
- The parser lowercases the whole line, so names are case-insensitive.
- The parser trims the name and the value.
liblsl finds the colon before it removes the comment, and it then uses the
old position. A semicolon before the colon therefore reads past the end of
the shortened line. This function returns None for that input, which is
the safe reading of a path that no upstream test covers. SPEC.md 4.3 records
the behavior as observed.