format

Generated by tinox doc

tinox.core.format, bundled with the compiler and also available as a standalone tinox-central package.

Padding and bases

import tinox.core.format
class Main
{
    fnc main() -> Int32
    {
        println(Format::padLeft("7", 3, "0"))
        println(Format::padRight("id", 6, "."))
        println(Format::intToHex(255))
        println(Format::intToBinary(10))
        println(Format::formatInt(42, 5))
        return 0
    }
}

class Format

Methods

fn padLeft(s: String, width: Int64, char: String) → String
fn padRight(s: String, width: Int64, char: String) → String
fn intToBinary(n: Int64) → String
fn intToHex(n: Int64) → String
fn formatInt(n: Int64, width: Int64) → String