O'Reilly logo

Protocol-Oriented Programming with Swift by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Let's Extend Some Types

Back in the early 90's, when the primary language that I developed in was C, I had numerous custom libraries that contained functionality that was not part of the standard C library. I found these libraries extremely usefully because I tended to use the functionality they provided in most of my projects. This functionality included things such as converting the first letter of a string to uppercase or converting a double value to a currency string (two digits after the decimal point and a currency symbol). Having libraries such as this is extremely useful because there is always functionality that we find useful that is not included in the standard library of the language we are developing in. I usually implemented ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required