Skip to main content

strings/
lib.rs

1use ryu::Float;
2
3pub fn itoa<I: core::fmt::Display>(n: I) -> String {
4    n.to_string()
5}
6
7pub fn ftoa<F: Float>(n: F) -> String {
8    let mut buffer = ryu::Buffer::new();
9    return buffer.format(n).to_string();
10}