Strings and Things

The recipes in this chapter are:

  • Finding the substring in a string
  • Breaking the string into words
  • Joining the string slice with a separator
  • Concatenating a string with writer
  • Aligning text with tabwriter
  • Replacing part of the string
  • Finding the substring in text by the regex pattern
  • Decoding a string from the non-Unicode charset
  • Controlling case
  • Parsing comma-separated data
  • Managing whitespace in a string
  • Indenting a text document

Get Go Standard Library Cookbook 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.