Created
February 14, 2015 03:29
-
-
Save ajjames/bf7610351f9339852011 to your computer and use it in GitHub Desktop.
StringExtensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public extension String | |
{ | |
public func contains(substring:String) -> Bool | |
{ | |
return self.rangeOfString(substring, options: NSStringCompareOptions.LiteralSearch, range: nil, locale: nil) != nil | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment