Reputation: 6573
How can I spilt the letters of a word. eg. example into {"e","x","a","m","p","l","e"}
using AppleScript. I can't add what I have tried as I dont know where to start.
Upvotes: 0
Views: 89
Reputation: 27633
items of "example" -- {"e", "x", "a", "m", "p", "l", "e"}
characters of "example" -- {"e", "x", "a", "m", "p", "l", "e"}
text 4 thru -1 of "example" -- "mple"
reverse of items of "example" as text -- "elpmaxe"
set text item delimiters to "e"
set ti to text items of "example" -- {"", "xampl", ""}
set text item delimiters to "f"
ti as text -- "fxamplf"
Upvotes: 3