Crate re_format

Source
Expand description

Miscellaneous tools to format and parse numbers, durations, etc.

TODO(emilk): move some of this numeric formatting into emath so we can use it in egui_plot.

Structs§

FloatFormatOptions
Options for how to format a floating point number, e.g. an f64.

Traits§

UnsignedAbs

Functions§

approximate_large_number
Pretty format a large number by using SI notation (base 10), e.g.
format_bytes
Pretty format a number of bytes by using SI notation (base2), e.g.
format_f32
Format a number with about 7 decimals of precision.
format_f64
Format a number with about 15 decimals of precision.
format_int
Pretty format a signed number by using thousands separators for readability.
format_lat_lon
Format a latitude or longitude value.
format_timestamp_secs
Formats a timestamp in seconds to a string.
format_uint
Pretty format an unsigned integer by using thousands separators for readability.
next_grid_tick_magnitude_nanos
When showing grid-lines representing time.
parse_bytes
parse_bytes_base2
parse_bytes_base10
parse_duration
parse_f64
Parses a number, ignoring whitespace (e.g. thousand separators), and treating the special minus character MINUS (−) as a minus sign.
parse_i64
Parses a number, ignoring whitespace (e.g. thousand separators), and treating the special minus character MINUS (−) as a minus sign.
parse_timestamp_secs
Parses seconds from a string.