Fix off by 1 error in String.drop_prefix (#319)

This commit is contained in:
Rudi Grinberg 2017-11-09 12:45:53 +08:00 committed by GitHub
parent dd99126d36
commit ea7fa8541b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ module String = struct
if length s = length prefix then
Some ""
else
Some (sub s ~pos:(length prefix) ~len:(length s - length prefix - 1))
Some (sub s ~pos:(length prefix) ~len:(length s - length prefix))
else
None