Skip to content

Add String::isEmpty()#220

Merged
aentinger merged 2 commits into
arduino:masterfrom
alranel:isempty
Nov 8, 2023
Merged

Add String::isEmpty()#220
aentinger merged 2 commits into
arduino:masterfrom
alranel:isempty

Conversation

@alranel

@alranel alranel commented Oct 31, 2023

Copy link
Copy Markdown
Contributor

This PR adds a tiny inline isEmpty() method to the String class. This is borrowed from the ESP32 core which made it popular.

@codecov-commenter

codecov-commenter commented Oct 31, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (65633ce) 95.53% compared to head (2e5570e) 95.53%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #220   +/-   ##
=======================================
  Coverage   95.53%   95.53%           
=======================================
  Files          16       16           
  Lines        1075     1075           
=======================================
  Hits         1027     1027           
  Misses         48       48           
Files Coverage Δ
api/String.h 90.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aentinger aentinger 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.

Hi @alranel ☕ 👋

Two minor points:

  • Indendation does not match the rest of the file (probably a TAB vs SPACE issue?)
  • Please provide a unit test that hard-codes the API expectation for this function.

@alranel

alranel commented Nov 7, 2023

Copy link
Copy Markdown
Contributor Author

Hi @aentinger!
Whoops, sorry for the bad indentation. I'm a spaces guy. Fixed, and unit test provided :)

@aentinger

Copy link
Copy Markdown
Contributor

I'm a spaces guy.

I'm a spaces guy myself but since there are tabs in that file ... 🤷 got-to-go with the flow I suppose 😁

@aentinger aentinger 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.

Thank you for applying my suggestions! 🙇

@aentinger aentinger merged commit fc9a636 into arduino:master Nov 8, 2023
@alranel alranel deleted the isempty branch November 9, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants