aboutsummaryrefslogtreecommitdiff
path: root/lib/jid.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/jid.ml')
-rw-r--r--lib/jid.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/jid.ml b/lib/jid.ml
index 4e58c5b..bbcd2a6 100644
--- a/lib/jid.ml
+++ b/lib/jid.ml
@@ -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