Sha256: e1df08c3171a8321aa0bc0c06beaae08b629ea83ab6261f7cb89569f7b6e999b
Contents?: true
Size: 511 Bytes
Versions: 151
Compression:
Stored size: 511 Bytes
Contents
open Core let check_valid_first_digits s = if s.[0] = '0' || s.[0] = '1' || s.[3] = '0' || s.[3] = '1' then None else Some s let number s = if not @@ String.is_empty (String.filter ~f:(Char.is_alpha) s) then None else let s = String.filter ~f:(Char.is_digit) s in match String.length s with | 10 -> check_valid_first_digits s | 11 when String.get s 0 = '1' -> check_valid_first_digits (String.drop_prefix s 1) | _ -> None
Version data entries
151 entries across 151 versions & 1 rubygems