Sometimes Kernel#puts and string interpolation doesn't give us the level of control we want over our program's output. When we need to control numeric formatting and field widths, we need …
Tag: text
Episode #192: Filenames
Ruby provides a lot of tools for breaking filenames into their component parts, but they aren't always well documented. Today's episode combines goes over some basics as well as a …
Episode #190: Gsub
Today we look at the humble String#gsub method, and learn that it has some surprising tricks up its sleeve.
Episode #107: String Subscript Assignment
In today's episode, we learn a wonderfully convenient way to substitute text.
Episode #104: Parsing Time
It would be great if time were always represented in readable, un-ambiguous ISO8601 formats. But when importing legacy data we don't often have that luxury. In this episode, we look …
Episode #099: String Subscript Regex
Today the focus is on a convenient way to extract substrings using regular expressions. We glossed over this technique briefly in an earlier episode, but now it's front and center.
Episode #042: Streaming
Does code optimized for RAM usage need to be ugly? Find out, in today's episode!
Episode #041: String#scan
Today's episode looks at a convenient tool for weeding through text and pulling out parts that match a given pattern.
Episode #040: Gradual Stiffening
In today's episode we'll try to come to grips with a slippery quality---a quality which is of importance to differentiating code that is easy to evolve, from code that isn't. …