HomePhabricator

util: Move util/string.h functions to util namespace

Description

util: Move util/string.h functions to util namespace

Summary:
There are no changes to behavior. Changes in this commit are all additions, and
are easiest to review using "git diff -U0 --word-diff-regex=." options.

Motivation for this change is to keep util functions with really generic names
like "Split" and "Join" out of the global namespace so it is easier to see
where these functions are defined, and so they don't interfere with function
overloading, especially since the util library is a dependency of the kernel
library and intended to be used with external code.

This is a partial backport of core#29015
https://github.com/bitcoin/bitcoin/pull/29015/changes/4f74c59334d496f28e1a5c0d84c412f9020b366f

Depends on D19754

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D19755

Details

Provenance
Ryan Ofsky <ryan@ofsky.org>Authored on Dec 6 2023, 20:13
PiRKCommitted on Mar 31 2026, 15:10
PiRKPushed on Mar 31 2026, 15:10
Reviewer
Restricted Project
Differential Revision
D19755: util: Move util/string.h functions to util namespace
Parents
rABC494029df0ca6: util: add TransactionError includes and namespace declarations
Branches
Unknown
Tags
Unknown