Chapter 5. Lets 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 useful 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 these 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 ...

Get Swift 3 Protocol-Oriented Programming - Second Edition now with O’Reilly online learning.

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