MCPcopy Index your code
hub / github.com/endbasic/endbasic / format_integer

Function format_integer

std/src/strings.rs:64–66  ·  view source on GitHub ↗

Formats an integer `i` for display.

(i: i32)

Source from the content-addressed store, hash-verified

62
63/// Formats an integer `i` for display.
64pub fn format_integer(i: i32) -> String {
65 if i.is_negative() { i.to_string() } else { format!(" {}", i) }
66}
67
68/// Parses a string `s` as an integer.
69pub fn parse_integer(s: &str) -> Result<i32, String> {

Callers 2

execMethod · 0.85
execMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected