]> matita.cs.unibo.it Git - helm.git/commitdiff
added name_of_uri
authorEnrico Tassi <enrico.tassi@inria.fr>
Fri, 16 May 2008 16:03:01 +0000 (16:03 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Fri, 16 May 2008 16:03:01 +0000 (16:03 +0000)
helm/software/components/ng_kernel/nUri.ml
helm/software/components/ng_kernel/nUri.mli

index e4dcddc0d0bb509edcda40cfb5f2abf04b26d2cd..5924036845b7a74db28f8fdd8c5b5762498fdee2 100644 (file)
@@ -15,6 +15,11 @@ type uri = int * string (* shareno, URI *)
 
 let string_of_uri (_, uri) = uri;;
 
+let name_of_uri (_, uri) = 
+  let name = Filename.basename uri in
+  Filename.chop_extension name
+;;
+
 module OrderedStrings =
  struct
   type t = string
index a11e4a1d21ffb14b109d5c3a3284cdcddd2a6b25..c5f6333552cb707f15f1f064eb936f70d0dde427 100644 (file)
@@ -14,6 +14,7 @@
 type uri
 
 val string_of_uri: uri -> string
+val name_of_uri: uri -> string
 val uri_of_string: string -> uri
 val eq: uri -> uri -> bool