Go Package fmt: Difference between revisions
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
message := fmt.Sprintf("Hi, %v. Welcome!", name) | message := fmt.Sprintf("Hi, %v. Welcome!", name) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
For more details on the format string, see: {{Internal|Go_Printing_to_Stdout_and_Stderr#fmt.Printf.28.29|<tt>Printf()</tt> Format String}} | |||
==<span id='fmt.Printf.28.29.2C_fmt.Println.28.29'></span><tt>Printf()</tt>, <tt>Println()</tt>== | ==<span id='fmt.Printf.28.29.2C_fmt.Println.28.29'></span><tt>Printf()</tt>, <tt>Println()</tt>== |
Revision as of 00:14, 16 September 2023
External
Internal
Functions
Sprintf()
Format a string and returns it as a result:
message := fmt.Sprintf("Hi, %v. Welcome!", name)
For more details on the format string, see: