Chapter 5. Working with Strings
In this chapter, you learn how to work with strings in more depth. You need to know how to manipulate strings to write more advanced programs. For example, you may want to add a suffix onto the end of every filename in a folder. Or you may want to see if each line in a document begins with a particular word.
I show you more about how special considering and ignoring statements can be used for string comparisons. You also learn how to test whether strings begin with, contain, or end with a specified string.
In this chapter, I also show you how to reference elements of a string, where an element can be a character, a word, or an entire paragraph. Understanding how to work with elements is critical to becoming proficient with AppleScript. The use of elements extends far beyond working with strings; you can apply elements to lists and to classes defined by other applications.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access