Xen / reference v0.1.0-demo.2
std.convert
This topic is not available in the selected language or version. Showing the start of this section.
APIs documented for this release.
use std.convert;| API | Result and purpose |
|---|---|
std.convert.parse_int(text: String) | Result<Int, ParseIntError>; signed decimal parsing |
std.convert.format_int(value: Int) | Decimal string |
parse_int does not trim whitespace. An optional + or - must be followed by at least one digit. Errors are ParseIntError.Empty, InvalidDigit((offset, byte)), and Overflow. The standard library has no corresponding floating-point string parsing or formatting functions.