Struct itoa::Buffer [−][src]
pub struct Buffer { /* fields omitted */ }
A safe API for formatting integers to text.
Example
let mut buffer = itoa::Buffer::new(); let printed = buffer.format(1234); assert_eq!(printed, "1234");
Methods
impl Buffer
[src]
impl Buffer
pub fn new() -> Buffer
[src]
pub fn new() -> Buffer
This is a cheap operation; you don't need to worry about reusing buffers for efficiency.
pub fn format<I: Integer>(&mut self, i: I) -> &str
[src]
pub fn format<I: Integer>(&mut self, i: I) -> &str
Print an integer into this buffer and return a reference to its string representation within the buffer.