Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/String-prepend/AppleScript/string-prepend-3.applescript
Normal file
17
Task/String-prepend/AppleScript/string-prepend-3.applescript
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use AppleScript version "2.4" -- OS X 10.10 (Yosemite) or later
|
||||
use framework "Foundation"
|
||||
|
||||
set aVariable to current application's class "NSString"'s stringWithString:("world!")
|
||||
set aVariable to aVariable's stringByReplacingCharactersInRange:({0, 0}) withString:("Hello ")
|
||||
-- return aVariable as text
|
||||
|
||||
-- Or:
|
||||
set aVariable to current application's class "NSString"'s stringWithString:("world!")
|
||||
set aVariable to current application's class "NSString"'s stringWithFormat_("%@%@", "Hello ", aVariable)
|
||||
-- return aVariable as text
|
||||
|
||||
-- Or:
|
||||
set aVariable to current application's class "NSString"'s stringWithString:("world!")
|
||||
set aVariable to aVariable's stringByReplacingOccurrencesOfString:("^") withString:("Hello ") ¬
|
||||
options:(current application's NSRegularExpressionSearch) range:({0, 0})
|
||||
-- return aVariable as text
|
||||
Loading…
Add table
Add a link
Reference in a new issue