Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vtourraine/nsstring-vtcontainssubstring
NSString category to test the presence of a given substring.
https://github.com/vtourraine/nsstring-vtcontainssubstring
Last synced: about 2 months ago
JSON representation
NSString category to test the presence of a given substring.
- Host: GitHub
- URL: https://github.com/vtourraine/nsstring-vtcontainssubstring
- Owner: vtourraine
- License: mit
- Created: 2014-05-05T15:10:32.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2021-02-01T13:57:14.000Z (almost 4 years ago)
- Last Synced: 2024-11-15T18:07:12.451Z (2 months ago)
- Language: Objective-C
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NSString+VTContainsSubstring
_`NSString` category to test the presence of a given substring._
[![Build Status](https://travis-ci.org/vtourraine/NSString-VTContainsSubstring.svg?branch=master)](https://travis-ci.org/vtourraine/NSString-VTContainsSubstring)
Starting with OS X 10.10 and iOS 8, `NSString` now offers a `containsString:` convenience method. The `vt_containsSubstring:` method is compatible with earlier versions, and is slightly more customizable with its `options` parameter.
## How to install
Available on CocoaPods. ![CocoaPods version badge](https://cocoapod-badges.herokuapp.com/v/NSString+VTContainsSubstring/badge.png)
![CocoaPods platform badge](https://cocoapod-badges.herokuapp.com/p/NSString+VTContainsSubstring/badge.png)``` ruby
pod 'NSString+VTContainsSubstring'
```## How to use
``` objc
NSString *string = @"I like cakes.";
[string vt_containsSubstring:@"cake"]; // = YES
[string vt_containsSubstring:@"Cake" options:NSCaseInsensitiveSearch]; // = YES
```## Credits
NSString+VTContainsSubstring was created by [Vincent Tourraine](http://www.vtourraine.net).
## License
NSString+VTContainsSubstring is available under the MIT license. See the LICENSE file for more info.