git.annexia.org
/
whenjobs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enable native code compilation when ocamlopt is available.
[whenjobs.git]
/
lib
/
whenutils.ml
diff --git
a/lib/whenutils.ml
b/lib/whenutils.ml
index
ca26755
..
5f7c4ee
100644
(file)
--- a/
lib/whenutils.ml
+++ b/
lib/whenutils.ml
@@
-63,3
+63,8
@@
let string_of_time_t ?(localtime = false) t =
(1900+tm.tm_year) (1+tm.tm_mon) tm.tm_mday
tm.tm_hour tm.tm_min tm.tm_sec
(if localtime then "" else " UTC")
(1900+tm.tm_year) (1+tm.tm_mon) tm.tm_mday
tm.tm_hour tm.tm_min tm.tm_sec
(if localtime then "" else " UTC")
+
+let string_endswith str suffix =
+ let len = String.length str in
+ let slen = String.length suffix in
+ len >= slen && String.sub str (len-slen) slen = suffix