Format¶
Provides functions for generating formatted strings.
- fmt. Format to use.
- prefix. Prefix to use.
- prec. Precision to use. The exact meaning of this depends on the type, but is generally the number of characters used for all, or part, of the string. A value of -1 indicates that the default for the type should be used.
- width. The minimum number of characters that will be in the produced string. If necessary the string will be padded with the fill character to make it long enough.
- align. Specify whether fill characters should be added at the beginning or end of the generated string, or both.
- fill. The character to pad a string with if is is shorter than width.
Constructors¶
create¶
Returns¶
- Format val^
Public Functions¶
apply¶
fun box apply(
str: String val,
fmt: FormatDefault val = reference,
prefix: PrefixDefault val = reference,
prec: USize val = call,
width: USize val = 0,
align: (AlignLeft val | AlignRight val | AlignCenter val) = reference,
fill: U32 val = 32)
: String iso^
Parameters¶
- str: String val
- fmt: FormatDefault val = reference
- prefix: PrefixDefault val = reference
- prec: USize val = call
- width: USize val = 0
- align: (AlignLeft val | AlignRight val | AlignCenter val) = reference
- fill: U32 val = 32
Returns¶
- String iso^
int[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Integer[A])]¶
fun box int[A: ((I8 val | I16 val | I32 val |
I64 val | I128 val | ILong val |
ISize val | U8 val | U16 val |
U32 val | U64 val | U128 val |
ULong val | USize val) & Integer[A])](
x: A,
fmt: (FormatDefault val | FormatUTF32 val | FormatBinary val |
FormatBinaryBare val | FormatOctal val | FormatOctalBare val |
FormatHex val | FormatHexBare val | FormatHexSmall val |
FormatHexSmallBare val) = reference,
prefix: (PrefixDefault val | PrefixSpace val | PrefixSign val) = reference,
prec: USize val = call,
width: USize val = 0,
align: (AlignLeft val | AlignRight val | AlignCenter val) = reference,
fill: U32 val = 32)
: String iso^
Parameters¶
- x: A
- fmt: (FormatDefault val | FormatUTF32 val | FormatBinary val | FormatBinaryBare val | FormatOctal val | FormatOctalBare val | FormatHex val | FormatHexBare val | FormatHexSmall val | FormatHexSmallBare val) = reference
- prefix: (PrefixDefault val | PrefixSpace val | PrefixSign val) = reference
- prec: USize val = call
- width: USize val = 0
- align: (AlignLeft val | AlignRight val | AlignCenter val) = reference
- fill: U32 val = 32
Returns¶
- String iso^
float[A: ((F32 val | F64 val) & FloatingPoint[A])]¶
fun box float[A: ((F32 val | F64 val) & FloatingPoint[A])](
x: A,
fmt: (FormatDefault val | FormatExp val | FormatExpLarge val |
FormatFix val | FormatFixLarge val | FormatGeneral val |
FormatGeneralLarge val) = reference,
prefix: (PrefixDefault val | PrefixSpace val | PrefixSign val) = reference,
prec: USize val = 6,
width: USize val = 0,
align: (AlignLeft val | AlignRight val | AlignCenter val) = reference,
fill: U32 val = 32)
: String iso^
Parameters¶
- x: A
- fmt: (FormatDefault val | FormatExp val | FormatExpLarge val | FormatFix val | FormatFixLarge val | FormatGeneral val | FormatGeneralLarge val) = reference
- prefix: (PrefixDefault val | PrefixSpace val | PrefixSign val) = reference
- prec: USize val = 6
- width: USize val = 0
- align: (AlignLeft val | AlignRight val | AlignCenter val) = reference
- fill: U32 val = 32
Returns¶
- String iso^
eq¶
Parameters¶
- that: Format val
Returns¶
- Bool val
ne¶
Parameters¶
- that: Format val
Returns¶
- Bool val