Code: Select all
sort chars of tWord ascending text
How can I accomplish my target?
Best, Gian-Reto.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
sort chars of tWord ascending text
Code: Select all
on mouseUp
put "antidisestablishmentarianism" into tWord -- could turn this into a function instead taking a word as a parameter
repeat for each char tChar in tWord -- break the word into items of 1 char
put tChar & comma after tNewWord
end repeat
delete the last char of tNewWord -- remove trailing comma
sort items of tNewWord ascending -- sort by items
replace comma with empty in tNewWord -- nuke the commas
put tNewWord -- if turned into a function this would be "return tNewWord
end mouseUp