From 0059868a1d3b98bfc820cdd06d47ffe63592baf7 Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Tue, 12 Nov 2024 09:41:04 -0500 Subject: [PATCH] Add Python to lenient_parse function mapping in README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 9742251..095de5d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ float and integer values. This package offers more flexible parsing than the standard Gleam functions, similar to Python's built-in `float()` and `int()` functions. +`float("3.14")` -> `"3.14" |> lenient_parse.to_float` +`int("42")` -> `"42" |> lenient_parse.to_int` +`int("1010", base=2)` -> `"1010" |> lenient_parse.to_int_with_base(base: 2)` + ## Installation ```sh