Fancy String Methods

Let’s learn a few fun string methods. You don’t have to memorize them all; you can just look up this page again if you forget them. I just want to show you a small part of what strings can do. In fact, I can’t remember even half of the string methods myself—but that’s fine, because you can find great references on the Internet with all the string methods listed and explained. (I will show you where to find them in Chapter 15, Beyond This Fine Book.) Really, I don’t even want to know all the string methods; it’s kind of like knowing every word in the dictionary. I can speak English just fine without knowing every word in the dictionary. (And isn’t that really the whole point of the dictionary? You don’t have to know what’s ...

Get Learn to Program, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.