{"id":19923202,"url":"https://github.com/swiftlang/swift-se0270-range-set","last_synced_at":"2025-12-11T23:01:48.254Z","repository":{"id":45576701,"uuid":"238744366","full_name":"swiftlang/swift-se0270-range-set","owner":"swiftlang","description":"Swift Evolution preview package for SE-0270.","archived":false,"fork":false,"pushed_at":"2024-07-17T21:22:21.000Z","size":37,"stargazers_count":20,"open_issues_count":0,"forks_count":7,"subscribers_count":142,"default_branch":"main","last_synced_at":"2025-04-07T13:06:10.420Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swiftlang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-06T17:24:14.000Z","updated_at":"2024-07-18T01:10:44.000Z","dependencies_parsed_at":"2024-07-18T01:26:24.754Z","dependency_job_id":null,"html_url":"https://github.com/swiftlang/swift-se0270-range-set","commit_stats":null,"previous_names":["apple/swift-se0270-range-set"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-se0270-range-set","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-se0270-range-set/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-se0270-range-set/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-se0270-range-set/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swiftlang","download_url":"https://codeload.github.com/swiftlang/swift-se0270-range-set/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252156821,"owners_count":21703361,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T22:13:20.645Z","updated_at":"2025-12-11T23:01:42.985Z","avatar_url":"https://github.com/swiftlang.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SE0270_RangeSet\n\n**SE0270_RangeSet** is a standalone library that implements the Swift Evolution proposal\n[SE-0270: Add Collection Operations on Noncontiguous Elements][proposal]. \nYou can use this package independently, \nor as part of the [standard library preview package][stdlib-preview].\n\n## Functionality\n\n**SE0270_RangeSet** provides operations on noncontiguous subranges of collections, \nsuch as `subranges(where:)` and `moveSubranges(_:to:)`, \nas well as the supporting `RangeSet` type.\n\n```swift\nimport SE0270_RangeSet\n\nvar numbers = [10, 12, -5, 14, -3, -9, 15]\nlet negatives = numbers.subranges(where: { $0 \u003c 0 })\n// numbers[negatives].count == 3\n\nnumbers.moveSubranges(negatives, to: 0)\n// numbers == [-5, -3, -9, 10, 12, 14, 15]\n```\n\n## Usage\n\nYou can add this library as a dependency to any Swift package. \nAdd this line to the `dependencies` parameter in your `Package.swift` file:\n\n```swift\n.package(\n    url: \"https://github.com/apple/swift-se0270-range-set\",\n    from: \"1.0.0\"),\n```\n\nNext, add the module as a dependency for your targets that will use the library:\n\n```swift\n.product(name: \"SE0270_RangeSet\", package: \"swift-se0270-range-set\"),\n```\n\nYou can now use `import SE0270_RangeSet` to make the library available in any Swift file.\n\n## Contributing\n\nWe are no longer taking contributions to this repo. Please see the \n[guide for Contributing to Swift][contributing] for other opportunities within the Swift\nproject. Thanks to all past contributors! \n\n\n[proposal]: https://github.com/apple/swift-evolution/blob/master/proposals/0270-rangeset-and-collection-operations.md\n[stdlib-preview]: https://github.com/apple/swift-standard-library-preview \n[user-forums]: https://forums.swift.org/c/swift-users/\n[bugs]: https://bugs.swift.org\n[evolution-process]: https://github.com/apple/swift-evolution/blob/master/process.md\n[contributing]: https://swift.org/contributing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftlang%2Fswift-se0270-range-set","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswiftlang%2Fswift-se0270-range-set","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftlang%2Fswift-se0270-range-set/lists"}