Skip to content

Conversation

@slurmlord
Copy link

This PR adds the string functions startsWith, startsWithNoCase, endsWith and endsWithNoCase to WWLib/stringex.h. Supports both char* and wchar_t*.

Replaced existing functions in AsciiString with calls to the corresponding new implementations:
AsciiString::startsWith
AsciiString::startsWithNoCase
AsciiString::endsWith
AsciiString::endsWithNoCase

Also added the same functions for UnicodeString.
This was split out from #1594 where the need for a endsWithNoCase for wchar_t surfaced.

@slurmlord slurmlord changed the title feat(string): Add generic string startWith/endsWith implementations feat(string): Add generic string startsWith/endsWith implementations Nov 23, 2025
@slurmlord slurmlord marked this pull request as ready for review November 23, 2025 20:17
Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good

@xezon xezon added Minor Severity: Minor < Major < Critical < Blocker Refactor Edits the code with insignificant behavior changes, is never user facing labels Nov 26, 2025
@xezon xezon changed the title feat(string): Add generic string startsWith/endsWith implementations refactor(string): Implement generic startsWith, endsWith functions for C strings Nov 26, 2025
@xezon xezon merged commit dd51b7e into TheSuperHackers:main Nov 26, 2025
24 checks passed
@slurmlord slurmlord deleted the slurmlord/string_starts_ends_with branch November 26, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Minor Severity: Minor < Major < Critical < Blocker Refactor Edits the code with insignificant behavior changes, is never user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants