Skip to content

[FEATURE] Add thousands digit separator for WriteIntegerOptions to use with to_string_with_options #85

@mrkaragoz

Description

@mrkaragoz

It would be good for ease of reading.

Example

const FORMAT: u128 = lexical::format::STANDARD;
let options = lexical::WriteIntegerOptions::builder()
    .thousands_separator("_")
    .build()
    .unwrap();
assert_eq!(lexical::to_string_with_options::<_, FORMAT>(10, &options), "10");
assert_eq!(lexical::to_string_with_options::<_, FORMAT>(1000000, &options), "1_000_000");

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions