AppleScript: The Definitive Guide, 2nd Edition
16.1. Strings
"\r" "\r"
Macintosh line-break character. There does not seem to be any conflict with the keyword return (see "Returned Value" in Chapter 9). The only place where a conflict could occur is when return is the first word of a line. The rule in that situation seems to be that if return is followed by an operator, it can't be the keyword, so it must be this property. Example
"This is a line." & return & "This is another line."
"\t" "\t"
Tab character. Example
"an item" & tab & "another item"
"\"" "\""
Quote character. (This is new in Tiger.) Example
quote & "This is cool," & quote & " said Tom frigidly."
" " " "
Space character. Example
"word" & space & "otherWord"
"" (the empty string) "" (the empty string)
The text item delimiters global property has two uses: it is used to split a string into its text item elements (see "String" in Chapter 13), and it is used to join list items when a list is coerced to a string (see "List Coercions" in Chapter 14). In theory it is a list of strings, but in fact it can be set to a string, and if it is a list, only the first item of the list matters. Example
set text item delimiters to ":" text item 1 of (path to system folder as string)
|
Категории