From: Enrico Tassi Date: Fri, 16 May 2008 16:03:01 +0000 (+0000) Subject: added name_of_uri X-Git-Tag: make_still_working~5189 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=fa9700ea545ddaed416fdabb9d9fb410ef528e97;p=helm.git added name_of_uri --- diff --git a/helm/software/components/ng_kernel/nUri.ml b/helm/software/components/ng_kernel/nUri.ml index e4dcddc0d..592403684 100644 --- a/helm/software/components/ng_kernel/nUri.ml +++ b/helm/software/components/ng_kernel/nUri.ml @@ -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 diff --git a/helm/software/components/ng_kernel/nUri.mli b/helm/software/components/ng_kernel/nUri.mli index a11e4a1d2..c5f633355 100644 --- a/helm/software/components/ng_kernel/nUri.mli +++ b/helm/software/components/ng_kernel/nUri.mli @@ -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