Previous Index Next

BridgePlus.framework, SMSForder Class Methods

Category

Substring extraction methods

Method

paragraphsOfString:

Summary

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.

Signature

+ (NSArray *)paragraphsOfString:(NSString *)aString

Parameters

aString = A string

Result

An array of strings

Availability

Version 1.0.0

Notes

 

Sample

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."}


Click here to open script in a script editor