Tutorial by Examples

To split a JID into its component parts (the localpart, domainpart, and resourcepart), the following algorithm should be used (where the localpart is represented by lp, the resourcepart by rp, and the domainpart by dp and ∈ is used to check if the given character is included in the string): Note ...
A JID consists of three parts: localpart@domainpart/resourcepart. Full JIDs (always have a resource part) [email protected]/orchard example.org/da863ab Bare JIDs (always without resource part) [email protected] example.org
Unlike emails, JIDs were defined with Internationalization (i18n) in mind using the Preparation, Enforcement, and Comparison of Internationalized Strings (PRECIS) framework. PRECIS (defined in RFC 7564), is a framework for comparing strings safely in a variety of contexts. For instance, imagine you...
The mellium.im/xmpp/jid package implements operations on JIDs. To split a JID string into its component parts the SplitString function may be used: lp, dp, rp, err := SplitString("[email protected]") No validation is performed by the function and the parts are not guaranteed to be vali...
In Rust the xmpp-addr (docs) crate can be used to manipulate JIDs. To split a JID into its component parts (without validating that those parts are valid), the Jid::split function may be used: let (lp, dp, rp) = Jid::split("[email protected]")?; assert_eq!(lp, Some("feste")); ...

Page 1 of 1