Add ASCII-insensitive string equality
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
The function eq_ignore_ascii_case should be added to std/string/cmp.wave. Start by examining the existing ASCII helpers in that file. Implement the comparison by iterating over bytes, folding ASCII A-Z to lowercase, and comparing. Write tests for empty strings, unequal lengths, mixed case, punctuation, and non-ASCII bytes. Run the tests at optimization levels O0 and O2 to ensure no regressions.
Written by the indexing model from the issue text.
Description
Motivation
std/string/cmp.wave only provides case-sensitive equality. General callers must implement ASCII folding themselves, while std/net/resolve_table.wave already has a private comparison loop for this purpose.
Scope
Add eq_ignore_ascii_case(a: str, b: str) -> bool to std::string::cmp. Fold ASCII A–Z, compare other bytes exactly, and stop at the NUL terminator. Reuse existing ASCII helpers where practical.
Keep eq unchanged. Unicode folding and locale-sensitive comparison are outside this task. Reusing the helper in the resolver is optional and must preserve service-name case sensitivity and the explicit resolution policy in #567.
Completion criteria
- Compare strings without allocation or input mutation.
- Cover empty strings, unequal lengths, mixed ASCII case, punctuation, and distinct non-ASCII bytes.
- Run focused regressions at O0/O2.
Difficulty: easy.
- Dominant language
- Rust
- Stars
- 53
- Forks
- 16
- Avg merge
- 3h 38m
- Merged PRs (30d)
- 48
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wavefnd/Wave
-
enhancement good first issue needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug ci good first issue needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug ci good first issue needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug good first issue needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug good first issue os compatibility
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Similar issues
-
bug github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
registrystack/registry-stack#1393 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
rocky-data/rocky#2181 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Openbot:ai-assisted component:indexer QA-roadmap status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
midnightntwrk/midnight-indexer#1557 ·