stdlib
stdlib copied to clipboard
🎁 Gleam's standard library
There is currently no way to (easily) convert from a BitArray that contains non-UTF codepoints to a String. This is usable when, for example, you need to handle filepaths and...
These functions would return an Ok value with the prefix or suffix stripped, or an Error(Nil) value when the prefix or suffix does not exist in the string. ```gleam case...
Here's a better implementation (a little less messy than the old one) for the `string.strip_prefix` and `string.strip_suffix` functions. It is based on erlang and javascript in order to take care...
Code: ```gleam { 1_237_698.0 /. 1_000_000.0 } |> float.to_precision(1) |> io.debug ``` Output: ``` 1.2000000000000002 ``` Gleam 1.5.1 stdlib 0.43.0