]> matita.cs.unibo.it Git - helm.git/blobdiff - matitaB/components/extlib/hExtlib.ml
Matitaweb:
[helm.git] / matitaB / components / extlib / hExtlib.ml
index 0b13cd83e4566013b74ec3b18019c4d2e542482d..78ac69126e19bc857feb8426b97ce24438142c0b 100644 (file)
@@ -224,6 +224,7 @@ let sharing_map_acc f acc l =
   !final_acc, if !unchanged then l else l1
 ;;
 
+(* expects the list to be sorted *)
 let rec list_uniq ?(eq=(=)) = function 
   | [] -> []
   | h::[] -> [h]
@@ -687,3 +688,9 @@ let rec list_skip n l =
   | _, [] -> assert false
 ;;
 
+let utf8_parsed_text s floc =
+  let start, stop = loc_of_floc floc in
+  let len = stop - start in
+  let res = Netconversion.ustring_sub `Enc_utf8 start len s in
+  res, String.length res
+