Repository navigation
Fix search, case and loader bugs before 3.0.0 - #8
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
preserveCase: true, strings added after init, or with surrounding whitespace, came back lowercase (616283b)."new "matched"newark"(fa44a2d). Prefixes and stored strings now trim the same characters (77d201a)."Straße"matches"strass"and"İstanbul"matches"ist"(b4a087c). Results use the stored characters, not the caller's form of the prefix (6054582).StringLoader:\r\nis one line break, and empty and whitespace-only lines are skipped (fc58300, 4958ae7).StringLoaderno longer returns empty lines or trims the first and last lines. Results withoutpreserveCaseare still the lowercased original text, for example"straße".Test Evidence
Run locally on 3e737ec with Xcode 27.1:
swift testswift test -c release -Xswiftc -enable-testingxcodebuild -scheme StringSearchKit -destination 'generic/platform=iOS' buildxcodebuild -scheme StringSearchKit -destination 'generic/platform=tvOS' buildpod lib lint --platforms=macos,iosThe CI run adds the full
pod lib lintwith tvOS.Every fix has a test that failed (or crashed with signal 10) before the fix. Two cold reviews mutation-checked the commits up to 77d201a: each mutation made at least one test fail.
How should this be manually tested?
StringDictionary(withStrings: [String(repeating: "a", count: 20_000)]), callstrings(withPrefix: "a"), then let it go out of scope. Expect no crash.StringDictionary(withStrings: ["Straße", "new york", "newark"], preserveCase: true). Expectstrings(withPrefix: "STRASS")to be["Straße"]andstrings(withPrefix: "new ")to be["new york"].Background
AGENTS.mdandCLAUDE.md(stacked on this branch), then a small follow-up for README and podspec points that already exist onmaster.pod trunk pushby 2026-10-31.