Latest 1.0.1
Homepage https://github.com/DragonCherry/NSRangeComplementarySet
License MIT
Platforms ios 8.0
Authors

Supports retrieve complementary set of range by exclude a range.

Example

let ranges = NSRange(location: 10, length: 10) - NSRange(location: 10, length: 3)
-> ranges: [(location: 13, length: 7)]

let ranges = NSRange(location: 10, length: 10) - NSRange(location: 15, length: 4)
-> ranges: [(location: 10, length: 5), (location: 19, length: 1)]

let ranges = NSRange(location: 10, length: 10) - NSRange(location: 15, length: 0)
-> ranges: [(location: 10, length: 10)]

let ranges = NSRange(location: 10, length: 10) - NSRange(location: 15, length: 10)
-> ranges: [(location: 10, length: 5)]

Installation

NSRangeComplementarySet is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "NSRangeComplementarySet"

Unlicense

Do whatever you want with this code.

Latest podspec

{
    "name": "NSRangeComplementarySet",
    "version": "1.0.1",
    "summary": "Supports retrieve complementary set of range by exclude a range.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/DragonCherry/NSRangeComplementarySet",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "DragonCherry": "[email protected]"
    },
    "source": {
        "git": "https://github.com/DragonCherry/NSRangeComplementarySet.git",
        "tag": "1.0.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "NSRangeComplementarySet/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This