Skip to content

Conversation

@addaleax
Copy link
Member

src: make ToLower/ToUpper input args more flexible

In particular, this enables passing std::string_view instead.

src: avoid unnecessary string allocations in SPrintF impl

If we can use a std::string_view instead of a std::string, let's
just do that instead.

In particular, this enables passing `std::string_view` instead.
If we can use a `std::string_view` instead of a `std::string`, let's just do that instead.
@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Sep 28, 2025
@addaleaxaddaleax changed the title Sprintf string view internalssrc: avoid unnecessary string allocations in SPrintF implSep 28, 2025
@codecov
Copy link

codecovbot commented Sep 28, 2025

Codecov Report

❌ Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.46%. Comparing base (c6316f9) to head (c9bad79).
⚠️ Report is 17 commits behind head on main.

Files with missing linesPatch %Lines
src/debug_utils-inl.h90.00%1 Missing ⚠️
src/util-inl.h90.00%0 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #60052 +/- ## ========================================== + Coverage 88.45% 88.46% +0.01%  ========================================== Files 703 703 Lines 207546 207549 +3 Branches 40011 40005 -6 ========================================== + Hits 183591 183615 +24 + Misses 15949 15906 -43 - Partials 8006 8028 +22 
Files with missing linesCoverage Δ
src/debug_utils.h80.00% <ø> (ø)
src/util.h90.90% <ø> (ø)
src/debug_utils-inl.h86.91% <90.00%> (+1.06%)⬆️
src/util-inl.h81.19% <90.00%> (-0.52%)⬇️

... and 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@addaleaxaddaleax added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Sep 28, 2025
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 28, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@addaleaxaddaleax added the review wanted PRs that need reviews. label Sep 30, 2025
addaleax added a commit that referenced this pull request Sep 30, 2025
In particular, this enables passing `std::string_view` instead. PR-URL: #60052 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
addaleax added a commit that referenced this pull request Sep 30, 2025
If we can use a `std::string_view` instead of a `std::string`, let's just do that instead. PR-URL: #60052 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
@addaleax
Copy link
MemberAuthor

Landed in f304bc2...4a9a022

targos pushed a commit that referenced this pull request Oct 6, 2025
In particular, this enables passing `std::string_view` instead. PR-URL: #60052 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
targos pushed a commit that referenced this pull request Oct 6, 2025
If we can use a `std::string_view` instead of a `std::string`, let's just do that instead. PR-URL: #60052 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 22, 2025
In particular, this enables passing `std::string_view` instead. PR-URL: #60052 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 22, 2025
If we can use a `std::string_view` instead of a `std::string`, let's just do that instead. PR-URL: #60052 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.c++Issues and PRs that require attention from people who are familiar with C++.lib / srcIssues and PRs related to general changes in the lib or src directory.needs-ciPRs that need a full CI run.review wantedPRs that need reviews.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@addaleax@nodejs-github-bot@jasnell@RafaelGSS