diff options
author | Clombrong <cromblong@egregore.fun> | 2025-07-02 20:03:15 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-07-26 21:55:50 +0200 |
commit | ce38fa913c3b450f1177a2d8e431dbbb8e31af66 (patch) | |
tree | 199b25217ee3d996081ab781ddaf5df46dde882b | |
parent | 9ec1d14b1478cda9ee730e01b084249d1d1e4a54 (diff) |
docs(jid): document of_string function
-rw-r--r-- | lib/jid.ml | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -30,6 +30,17 @@ let uchars_of_string s : uchars = loop ((u, i) :: acc) (i + k) in loop [] 0 +(** Convert a [string] to a [Jid.t]. + + This function traverses the JID until an '/' char (or the end of the string) occurs. + + Anything before is the "bare" JID, and anything eventually after is the resource. + + Then, the function goes backward until an '@' char (or the start of the string) + occurs. + + Anything after is the domain, and anything eventually before is the localpart + (username). *) let of_string (jid : string) : t = let open List in let open String in |