[][src]Crate lexical

Fast lexical conversion routines.

Fast lexical conversion routines for both std and no_std environments. Lexical provides routines to convert numbers to and from decimal strings. Lexical also supports non-base 10 numbers, for both integers and floats. Lexical is simple to use, and exports only 6 functions in the high-level API.

Lexical heavily uses unsafe code for performance, and therefore may introduce memory-safety issues. Although the code is tested with wide variety of inputs to minimize the risk of memory-safety bugs, no guarantees are made and you should use it at your own risk.

Modules

atof

Fast lexical string-to-float conversion routines.

atoi

Fast lexical string-to-integer conversion routines.

ftoa

Fast lexical float-to-string conversion routines.

itoa

Fast lexical integer-to-string conversion routines.

Statics

EXPONENT_BACKUP_CHAR

Backup character for scientific notation, used when the radix >= 15.

EXPONENT_DEFAULT_CHAR

Default character for scientific notation, used when the radix < 15.

INFINITY_STRING

Infinity literal

NAN_STRING

Not a Number literal

Functions

parse

High-level conversion of decimal-encoded bytes to a number.

parse_radix

High-level conversion of bytes to a number with a custom radix.

to_string

High-level conversion of a number to a decimal-encoded string.

to_string_radix

High-level conversion of a number to string with a custom radix.

try_parse

High-level conversion of decimal-encoded bytes to a number.

try_parse_radix

High-level conversion of bytes to a number with a custom radix.