Sign in

    ShiChengxu/moonlayout/align does not have a README file

    Alignment

    pub(all) enum Alignment {
    Left
    Right
    Center
    Justify
    } derive(Eq,
    Debug
    )

    Horizontal alignment in monospace display columns.

    Alignment::equal

    fn Alignment::equal(Alignment, Alignment) -> Bool

    Alignment::not_equal

    fn Alignment::not_equal(x : Alignment, y : Alignment) -> Bool

    align_lines

    fn align_lines(lines : Array[
    Line
    ], width : Int, alignment : Alignment) -> Array[String]

    Pad each line to width without truncating overflow. Center puts an odd extra space on the right. Justify stretches inter-word spaces or permitted CJK grapheme gaps; final/Hard/End lines and lines with no slots are left-aligned. Source ranges are untouched. All measurements respect each line's width mode.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io