[m-rev.] for review: add uint->uintN conversions

Julien Fischer jfischer at opturion.com
Tue Jul 6 11:58:37 AEST 2021


On Tue, 6 Jul 2021, Zoltan Somogyi wrote:

> Speed up converting strings to ints/uints.
> 
> library/string.m:
>     Test whether base string is between 2 and 36 just once.
> 
> library/char.m:
>     Provide a predicate to convert a character to a base digit
>     that does not check whether the base is between 2 and 36,
>     leaving that to the caller.
>
>     Make the error message for bases not in that range more informative,
>     in the predicates that *do* check the base.
> 
> NEWS:
>     Announce unsafe_base_digit_to_int.

> diff --git a/NEWS b/NEWS
> index 97fcf6678..9a9214ca7 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -65,6 +65,9 @@ Changes to the Mercury standard library
>
>  ### Changes to the `char` module
> 
> +* The following predicate has been added:
> +    - pred `unsafe_base_digit_to_int/3`

There should be blank line between those two lines.

The rest is fine.

Julien.




More information about the reviews mailing list