Previous | Index | Next |
Substring extraction methods
paragraphsOfString:
Splits a string into paragraphs; recognizes return, linefeed, CRLF, and Unicode paragraph break. Useful if you have an NSString, so you don’t have to convert to a string first.
+ (NSArray *)paragraphsOfString:(NSString *)aString
aString = A string
An array of strings
Version 1.0.0
use scripting additions
use framework "Foundation"
use script "BridgePlus"
load framework
set aString to "This is a string." & linefeed & "It has two paragraphs."
set theResult to current application's SMSForder's paragraphsOfString:aString
ASify from theResult
--> {"This is a string.", "It has two paragraphs."}
theResult as list
--> {"This is a string.", "It has two paragraphs."}