Skip to content

Treat NUL bytes as empty in Str::isEmpty() - #82

Merged
lippserd merged 1 commit into
mainfrom
str-is-empty-nul-byte
Jul 30, 2026
Merged

Treat NUL bytes as empty in Str::isEmpty()#82
lippserd merged 1 commit into
mainfrom
str-is-empty-nul-byte

Conversation

@lippserd

Copy link
Copy Markdown
Member

Str::isEmpty() now treats NUL bytes as empty, including when combined with whitespace or other accepted empty characters. The method contract and regression coverage document and verify the behavior.

NUL bytes are invisible but fell outside the accepted empty character set.
This also caused combinations of NUL bytes and whitespace to be considered
nonempty.
@lippserd lippserd added this to the v1.0.0 milestone Jul 27, 2026
@cla-bot cla-bot Bot added the cla/signed label Jul 27, 2026
@lippserd lippserd modified the milestones: v1.0.0, v0.16.1 Jul 27, 2026
@lippserd
lippserd requested a review from jrauh01 July 27, 2026 09:52

@jrauh01 jrauh01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works well!

@lippserd
lippserd merged commit 920f8ce into main Jul 30, 2026
13 checks passed
@lippserd
lippserd deleted the str-is-empty-nul-byte branch July 30, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants