Sha256: ea987949a268f2da216f4e4b6f163dad2dd03aceaf4c3f98a4d8441d025db2c8
Contents?: true
Size: 539 Bytes
Versions: 68
Compression:
Stored size: 539 Bytes
Contents
open Base let check_valid_first_digits s = if Char.(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 Char.(String.get s 0 = '1') -> check_valid_first_digits (String.drop_prefix s 1) | _ -> None
Version data entries
68 entries across 68 versions & 1 rubygems