5.10. Summary

Manipulating character strings is an important skill if you want to become proficient at AppleScript programming. You learned the following concepts in this chapter:

  • A review of how to concatenate two or more character strings using the concatenation operator &

  • The difference between strings, text, and Unicode text

  • How to count the number of characters, words, and paragraphs in a string

  • How to compare character strings using the special considering and ignoring statements

  • How to specify elements to extract characters, words, and paragraphs from a string

  • How to enumerate every character, word, and paragraph from a string

  • How to test if one character string contains another string

  • How to find the location of one character string inside another string, and how to see if one string begins or ends with another string

  • How to extract a substring from a string

  • How to change the delimiter characters that define a text item using text item delimiters

In the next chapter, you learn to work with the two data structures available in AppleScript that enable you to collectively store and manipulate groups of data: lists and records. Before proceeding, however, try the exercises that follow to test your understanding of the material covered in this chapter. You can find the solutions to these exercises in Appendix A.

Get Beginning AppleScript® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.