Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-11-04 05:45:32 -06:00
parent 52991d305f
commit 2b11a4e334
2 changed files with 10 additions and 0 deletions

View File

@ -61,6 +61,12 @@ func Printf(s string, a ...any) {
realPrintf(s, a...) realPrintf(s, a...)
} }
func Sprint(a ...any) string {
if ! PRINTLN.Ok() { return ""}
if ! PRINTLN.b { return ""}
return realSprint(a...)
}
func Sprintf(s string, a ...any) string { func Sprintf(s string, a ...any) string {
if ! PRINTLN.Ok() { return ""} if ! PRINTLN.Ok() { return ""}
if ! PRINTLN.b { return ""} if ! PRINTLN.b { return ""}

View File

@ -36,6 +36,10 @@ func realPrintf(s string, a ...any) {
} }
} }
func realSprint(a ...any) string {
return fmt.Sprint(a...)
}
func realSprintf(s string, a ...any) string { func realSprintf(s string, a ...any) string {
return fmt.Sprintf(s, a...) return fmt.Sprintf(s, a...)
} }