Previous | Index | Next |
String manipulation methods
cleanSpacedFrom:
Converts runs of more than one space to a single space character, and trims spaces from the beginning and end of paragraphs.
+ (id)cleanSpacedFrom:(id)listOrString
listOrString = a string or list of strings
If passed a string, returns the new string; if passed a list, an array of new strings.
Version 1.0.0
use scripting additions
use framework "Foundation"
use script "BridgePlus"
load framework
set aString to " Of time and space "
set theResult to current application's SMSForder's cleanSpacedFrom:aString
ASify from theResult
--> "Of time and space"
theResult as text
--> "Of time and space"