From 368a0b045d3df1aa126458cf485e07eab153924d Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 1 Jul 2014 10:57:14 +0200 Subject: Finish up EDDs --- libs/util.ml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libs') diff --git a/libs/util.ml b/libs/util.ml index 88b916f..940fe3e 100644 --- a/libs/util.ml +++ b/libs/util.ml @@ -80,6 +80,14 @@ let uid = fun () -> c := !c + 1; string_of_int !c +(* String *) + +let is_suffix s sf = + let n = String.length s in + let k = String.length sf in + n >= k && sf = String.sub s (n-k) k + + (* Time heavy functions *) let times_k : (string, float) Hashtbl.t = Hashtbl.create 10 -- cgit v1.2.3