Previous Index Next

BridgePlus.framework, SMSForder Class Methods

Category

Substring extraction methods

Method

stringsOfString:inString:options:

Summary

Returns an array of all matching substrings. Anchored and backwards search options don't make sense here.

Signature

+ (NSArray *)stringsOfString:(NSString *)toFind inString:(NSString *)aString options:(NSStringCompareOptions)compareOptions

Parameters

toFind = the string to look for

aString = the string to search

compareOptions = Any of the NSStringCompareOptions

Result

A list of matching strings

Availability

Version 1.2.0

Notes

 

Sample

use scripting additions

use framework "Foundation"

use script "BridgePlus"

load framework


set aString to "This is a string. And this also part of the String."

set theResult to current application's SMSForder's stringsOfString:"string" inString:aString options:((current application's NSCaseInsensitiveSearch) + (current application's NSDiacriticInsensitiveSearch as integer))

ASify from theResult

--> {"string", "String"}

theResult as list

--> {"string", "String"}


Click here to open script in a script editor