20 releases (8 stable)
new 2.2.0 | May 11, 2025 |
---|---|
1.0.0 | Dec 20, 2024 |
0.3.1 | Oct 5, 2024 |
0.1.3 | May 7, 2024 |
0.1.2 | Mar 16, 2024 |
#604 in Parser implementations
342 downloads per month
Used in 2 crates
(via ircv3_parse)
43KB
1K
SLoC
IRCv3 Message Tags Parser
Examples
let input = "@id=234AB;+example.com/key=value :nick!user@host PRIVMSG #channel :Hello";
let (remain, tags) = ircv3_tags::parse(input);
assert_eq!(remain, ":nick!user@host PRIVMSG #channel :Hello");
assert_eq!(tags.get("id"), Some("234AB"));
assert_eq!(tags.get("+example.com/key"), Some("value"));
For more information, see the IRCv3 Message Tags specification.
IRCv3 Message Tags Parser
Examples
let input = "@id=234AB;+example.com/key=value :nick!user@host PRIVMSG #channel :Hello";
let (remain, tags) = ircv3_tags::parse(input);
assert_eq!(remain, ":nick!user@host PRIVMSG #channel :Hello");
assert_eq!(tags.get("id"), Some("234AB"));
assert_eq!(tags.get("+example.com/key"), Some("value"));
Returns a IResult
let input = "@id=123 :nick!user@host PRIVMSG #channel :Hello";
let result = ircv3_tags::try_parse(input);
assert!(result.is_ok());
Dependencies
~1MB
~17K SLoC