RosettaCodeData/Task/String-prepend/AppleScript/string-prepend-4.applescript

7 lines
264 B
AppleScript
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
use AppleScript version "2.4" -- OS X 10.10 (Yosemite) or later
use framework "Foundation"
set aVariable to current application's class "NSMutableString"'s stringWithString:("world!")
tell aVariable to insertString:("Hello ") atIndex:(0)
return aVariable as text