Language Guide
CHAPTER 3
Values
Value Class Definitions 65
You cannot set the value of an element of a string. For example, if you attempt
to change the value of the first character of the string "boris" as shown in the
following example, you’ll get an error.
set myName to "boris"
set character 1 of myName to "D"
--results in an error, because you cannot set the values of
--elements of strings
Styled Text 3
The class identifier Styled Text is a synonym for a string that includes style and
font information.
LITERAL EXPRESSIONS
The only difference between a value of class String and a value of class Styled
Text is that the latter can include (but is not required to include) style and font
information. Thus any valid literal expression of class String is also valid as
class Styled Text.
PROPERTIES
Class The class identifier for the object. This property is read-only, and
its value is always string.
Length The number of characters in the string.
ELEMENTS
Styled text has the same character, word, paragraph, and text elements as
a string.