From fa9700ea545ddaed416fdabb9d9fb410ef528e97 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Fri, 16 May 2008 16:03:01 +0000 Subject: [PATCH] added name_of_uri --- helm/software/components/ng_kernel/nUri.ml | 5 +++++ helm/software/components/ng_kernel/nUri.mli | 1 + 2 files changed, 6 insertions(+) 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 -- 2.39.2