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-bot nodejs-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
@addaleax addaleax changed the title Sprintf string view internals src: avoid unnecessary string allocations in SPrintF impl Sep 28, 2025
Copy link

codecov bot 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 lines Patch % Lines
src/debug_utils-inl.h 90.00% 1 Missing ⚠️
src/util-inl.h 90.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 lines Coverage Δ
src/debug_utils.h 80.00% <ø> (ø)
src/util.h 90.90% <ø> (ø)
src/debug_utils-inl.h 86.91% <90.00%> (+1.06%) ⬆️
src/util-inl.h 81.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.

@addaleax addaleax 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-actions github-actions bot 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

@addaleax addaleax 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 <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
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 <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
@addaleax
Copy link
Member Author

Landed in f304bc2...4a9a022

@addaleax addaleax closed this Sep 30, 2025
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 <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
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 <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs 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 / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. review wanted PRs that need reviews.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants