Book Image

Swift 5 New Features [Video]

By : Dee Aliyu Odumosu
Book Image

Swift 5 New Features [Video]

By: Dee Aliyu Odumosu

Overview of this book

<p>If you are already a Swift programmer, this course will get you up-to-date with all the new features in Swift 5 to improve your productivity and efficiency. </p><p>You will become fully acquainted with the new String ergonomics and improvements to the current Swift Standard Library, and discover some new examples of syntactical sugar that will let you write shorter but more powerful code. You will learn about the new result type for handling errors, thereby making your code more robust. Finally, you will learn how to migrate to Swift 5 as easily as possible. </p><p>By the end of the course, you will have gained up-to-date insights into all of Swift 5's features and will be able to code efficiently and rapidly within your projects. </p><p>The code bundle is available at: https://github.com/PacktPublishing/-Swift-5-New-Features</p>
Table of Contents (6 chapters)
Chapter 1
Manipulating and Checking Values
Content Locked
Section 4
Unicode Scalar Properties
When working with unicode scalars in Swift 4.2, we had to check for range of values, for example, in order to know if unicode is a small letter alphabet, we had to check if the unicode value is between 97 and 122, and in order to check if a unicode represents a digit from 0 to 9, we had to check between 48 and 57. This can become very tedious and it is error prone, this is why Swift 5 introduced many unicode properties to make this check very easy.