Answer the question
In order to leave comments, you need to log in
What is the difference between Sprintf, Printf, Fprint?
When should you use Sprintf, Fprintf, Printf? Same for Scan. What are the differences between these prefixes F, S?
Answer the question
In order to leave comments, you need to log in
sprintf: s - string, print - print, f - formatted mode; formatted print to line.
fprintf: f - file; formatted print to file.
printf: formatted print to a standard location, usually the console.
https://golang.org/pkg/fmt/#Printf
https://golang.org/pkg/fmt/#Sprintf
https://golang.org/pkg/fmt/#Fprintf
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question