swiftlang / swiftlang/swift-experimental-string-processing

Don't operate on a collection and a range of indices if you can help it.

Open
#711 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
308
Forks
52
Avg merge
12h 45m
Merged PRs (30d)
2

Description

I just noticed https://developer.apple.com/documentation/swift/customconsumingregexcomponent/consuming(_:startingat:in:)

In general APIs are cleaner if you just operate on collections and use slices to limit what you're looking at. Obviously if that's not possible in this case, please ignore. Otherwise, please apply as broadly as possible ;-)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Swift documentation for consuming(_:startingAt:in:) and inspect related APIs in the repository. Identify places that accept both a collection and index range, then determine which can use collection slices instead; done means applying that change as broadly as feasible without altering behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
api
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.