diff options
author | Clombrong <cromblong@egregore.fun> | 2025-07-02 19:57:35 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-07-26 21:55:50 +0200 |
commit | 9ec1d14b1478cda9ee730e01b084249d1d1e4a54 (patch) | |
tree | bafff6966f81da79da7ef06e5c109a8ac50aaca6 | |
parent | da55fb529db908834f4910ca8da31537d2f20b95 (diff) |
docs(jid): document utf8 functions
-rw-r--r-- | lib/jid.ml | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -5,10 +5,15 @@ type t = { resourcepart : string option; } +(** Valid JID are all UTF8 code points, so an invalid JID will raise [InvalidUTF8]. *) exception InvalidUTF8 +(** A list of UTF8 code points, associated with their respective position. *) type uchars = (Uchar.t * int) list +(** [uchars_of_string s] is an [uchars] of the UTF8 characters of the string [s]. + + If an invalid UTF8 character, the functions raises an [InvalidUTF8] exception. *) let uchars_of_string s : uchars = let open Uchar in let len = String.length s in |