https://github.com/hyperoslo/nsstring-hypwordextractor
The easiest way of extracting all words from a string
https://github.com/hyperoslo/nsstring-hypwordextractor
Last synced: about 1 year ago
JSON representation
The easiest way of extracting all words from a string
- Host: GitHub
- URL: https://github.com/hyperoslo/nsstring-hypwordextractor
- Owner: hyperoslo
- License: mit
- Created: 2014-10-13T16:31:04.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-21T08:07:43.000Z (about 11 years ago)
- Last Synced: 2024-10-10T20:02:53.723Z (over 1 year ago)
- Language: Objective-C
- Size: 219 KB
- Stars: 5
- Watchers: 17
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
#NSString-HYPWordExtractor
[](https://travis-ci.org/hyperoslo/NSString-HYPWordExtractor)
A super easy way of extracting all or only unique words from an NSString
#### Extracting unique words would look like this:
``` objc
NSString *string = @"first_name last_name";
NSSet *uniqueWords = [string hyp_uniqueWords];
```
Would produce
```
uniqueWords: {(
"first_name",
"last_name"
)}
```
#### Extracting all words would look like this:
``` objc
NSString *string = @"first_name last_name last_name";
NSArray *words = [string hyp_words];
```
Would produce
```
words: (
"first_name",
"last_name",
"last_name"
)
```
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
## Credits
[Hyper](http://hyper.no) made this. We're a digital communications agency with a passion for good code,
and if you're using this library we probably want to hire you.
## License
NSString-HYPWordExtractor is available under the MIT license. See the [LICENSE](https://raw.githubusercontent.com/hyperoslo/NSString-HYPWordExtractor/master/LICENSE.md) file for more info.