summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1996-04-01 15:25:28 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1996-04-01 15:25:28 +0000
commit091c08f7f77e3791605281d850734bd3e0038f06 (patch)
treead5b6c2cd7849772c9bb31e41530a367341b98b8
parent3a2b81c9d80ebd304c5b0410cfcceae73b54b72d (diff)
Bug dans string_before.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@718 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--otherlibs/str/str.ml3
1 files changed, 1 insertions, 2 deletions
diff --git a/otherlibs/str/str.ml b/otherlibs/str/str.ml
index 9f3704677..1a123d323 100644
--- a/otherlibs/str/str.ml
+++ b/otherlibs/str/str.ml
@@ -21,8 +21,7 @@ external beginning_group: int -> int = "str_beginning_group"
external end_group: int -> int = "str_end_group"
external replacement_text: string -> string -> string = "str_replacement_text"
-let string_before s n =
- if n = 0 then s else String.sub s 0 n
+let string_before s n = String.sub s 0 n
let string_after s n = String.sub s n (String.length s - n)