From f8e9ab3caf435d45748bb0b15f4d74b6327d3832 Mon Sep 17 00:00:00 2001 From: Arun Kumar Date: Fri, 25 Oct 2019 06:09:27 -0700 Subject: [PATCH] Delete unused is_decimal_int Reviewed By: Wilfred Differential Revision: D18135858 fbshipit-source-id: 5ee21fb9bdd60410dcd15ce565d0a8c617c2d426 --- hphp/hack/src/hhbc/hhbc_string_utils.ml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/hphp/hack/src/hhbc/hhbc_string_utils.ml b/hphp/hack/src/hhbc/hhbc_string_utils.ml index 8629f382c99..97dfb21b97c 100644 --- a/hphp/hack/src/hhbc/hhbc_string_utils.ml +++ b/hphp/hack/src/hhbc/hhbc_string_utils.ml @@ -100,26 +100,6 @@ module Integer = struct | _ -> "0o" ^ String_utils.lstrip s "0" else s - - (* In order for this to be true, every char has to be a number as well as - * if the first digit is a zero, then there cannot be more digits - * negative zero is dealt specially as it is not casted to zero - * - * E.g.: - * -1 -> true - * -0 -> false (special case) - * 08 -> false (octal) - * 0b1 -> false (binary) - * - * *) - let is_decimal_int s = - if s = "-0" then - false - else - let s = String_utils.lstrip s "-" in - String_utils.fold_left s ~acc:true ~f:(fun acc i -> - String_utils.is_decimal_digit i && acc) - && (String.length s = 1 || s.[0] <> '0') end module Float = struct -- 2.11.4.GIT