© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. FreemanPro Gohttps://doi.org/10.1007/978-1-4842-7355-5_17

17. Formatting and Scanning Strings

Adam Freeman1  
(1)
London, UK
 
In this chapter, I describe the standard library features for formatting and scanning strings. Formatting is the process of composing a new string from one or more data values, while scanning is the process of parsing values from a string. Table 17-1 puts formatting and scanning strings in context.
Table 17-1

Putting Formatting and Scanning Strings in Context

Question

Answer

What are they?

Formatting is the process of composing values into a string. Scanning is the process of parsing a string for the values it contains.

Why are they useful? ...

Get Pro Go: The Complete Guide to Programming Reliable and Efficient Software Using Golang now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.