Create characters using Unicode syntax, and see how a grapheme cluster of multiple Unicode values are combined into a single human-readable character.
- [Instructor] I used character and string types…in the last chapter.…And I explained that a character in Swift represents one…or more Unicode scalar values.…This is called an extended graphing cluster,…and each cluster forms a single human-readable character.…I'm not trying to make you a Unicode expert here.…I just want to explain things enough,…so that you can effectively use characters…and strings in Swift.…Each Unicode scalar value is a 21-bit number…representing a character.…To write a Unicode scalar value in Swift,…write a backslash U,…followed by the value in curly braces,…all within double quotes.…
And remember that you have to explicitly define…a character type.…Otherwise, it'll be inferred to be a string.…I mentioned a moment ago,…that a character can contain one or more values.…I'll duplicate the first example.…And I'll add the acute accent modifier to letter A.…Now, I'll add another modifier to enclose it in a circle.…
So, where can you see a list…of Unicode scalar values to use?…A quick search online will find plenty of resources.…
Learn how to write code, understand Swift's key concepts and best practices, and strengthen your programming problem-solving skills. Instructor Scott Gardner teaches the fundamentals, so you'll be prepared to develop applications for iOS, macOS, and other platforms. Completing this course will enable you to not only write first-class code, but to think like a Swift developer.
- Creating playgrounds
- Defining variables and constants
- Working with characters and strings
- Working with collections and groups
- Using operators and defining custom operators
- Controlling program flow
- Defining functions and closures
- Working with classes, structures, and enumerations
- Adopting protocols
Skill Level Beginner
1. Get Started
2. Variables and Constants
3. Characters and Strings
4. Collections and Tuples
6. Control Flow
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.