2026-03-30 00:54:20 +00:00
|
|
|
// SPDX-License-Identifier: EUPL-1.2
|
2026-03-29 23:59:48 +00:00
|
|
|
|
|
|
|
|
package fmtx
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"io"
|
|
|
|
|
|
|
|
|
|
core "dappco.re/go/core"
|
|
|
|
|
"dappco.re/go/core/scm/internal/ax/stdio"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Sprint mirrors fmt.Sprint using Core primitives.
|
2026-03-30 14:11:15 +00:00
|
|
|
// Usage: Sprint(...)
|
2026-03-29 23:59:48 +00:00
|
|
|
func Sprint(args ...any) string {
|
|
|
|
|
return core.Sprint(args...)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Sprintf mirrors fmt.Sprintf using Core primitives.
|
2026-03-30 14:11:15 +00:00
|
|
|
// Usage: Sprintf(...)
|
2026-03-29 23:59:48 +00:00
|
|
|
func Sprintf(format string, args ...any) string {
|
|
|
|
|
return core.Sprintf(format, args...)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Fprintf mirrors fmt.Fprintf using Core primitives.
|
2026-03-30 14:11:15 +00:00
|
|
|
// Usage: Fprintf(...)
|
2026-03-29 23:59:48 +00:00
|
|
|
func Fprintf(w io.Writer, format string, args ...any) (int, error) {
|
|
|
|
|
return io.WriteString(w, Sprintf(format, args...))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Printf mirrors fmt.Printf.
|
2026-03-30 14:11:15 +00:00
|
|
|
// Usage: Printf(...)
|
2026-03-29 23:59:48 +00:00
|
|
|
func Printf(format string, args ...any) (int, error) {
|
|
|
|
|
return Fprintf(stdio.Stdout, format, args...)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Println mirrors fmt.Println.
|
2026-03-30 14:11:15 +00:00
|
|
|
// Usage: Println(...)
|
2026-03-29 23:59:48 +00:00
|
|
|
func Println(args ...any) (int, error) {
|
|
|
|
|
return io.WriteString(stdio.Stdout, Sprint(args...)+"\n")
|
|
|
|
|
}
|