10
0
mirror of https://gitlab.com/scemama/EZFIO.git synced 2024-12-22 12:23:34 +01:00

Enhancement in ocaml empty strings

This commit is contained in:
Anthony Scemama 2014-10-17 11:52:10 +02:00
parent 2400d4d4e9
commit f77c499fc2
2 changed files with 5 additions and 3 deletions

View File

@ -104,7 +104,8 @@ let ltrim s =
| ' ' -> do_work (String.sub s 1 (l-1)) (l-1)
| _ -> s
in
do_work s (String.length s)
if (l > 0) then do_work s l
else s
;;
let rtrim s =
@ -115,7 +116,8 @@ let rtrim s =
| ' ' -> do_work (String.sub s 0 (newl)) (newl)
| _ -> s
in
do_work s (String.length s)
if (l > 0) then do_work s l
else s
;;
let trim s = ltrim (rtrim s) ;;

View File

@ -1 +1 @@
VERSION=1.1.7
VERSION=1.1.8