STRING::PRINTF 1g 2023 laplante@plcb.ca GOWEB/STRING — Formatted Output Printing


title: “STRING::PRINTF” version: “1.0.0” date: 2023 author: “laplante@plcb.ca” section: “1g”

category: “GOWEB/STRING”

Name

string::printf Formatted Output Printing

Synopsis

string::printf(format[, args])
printf(format[, args])

Description

The printf function outputs formatted text, similar to Go’s fmt.Printf.
It supports a wide range of format verbs for various data types:

General

Boolean

Integer

Floating Point / Complex

String

Pointer


Width & Precision


Flags


Examples

res={{
    a := [1, 2.2, "3"];
    printf("%!T(MISSING) %!T(MISSING) %!T(MISSING)\n", a);
}}.

Returns:

res=int64 float64 string

res={{
    a := [1, 2.2, "3", [1,2,3]];
    printf("%!T(MISSING) %!T(MISSING) %!T(MISSING) %!T(MISSING)\n", a);
}}.

Returns:

res=int64 float64 string int64
%!!(MISSING)(EXTRA int64=2, int64=3)

Author

laplante@plcb.ca

See Also


Version