HomePhabricator

Use std::string_view throughout util strencodings/string

Description

Use std::string_view throughout util strencodings/string

Summary:

Use std::string_view throughout util strencodings/string

https://github.com/bitcoin/bitcoin/pull/25001/commits/e7d2fbda63c346ae88767c3f8d4db3edeae2dc0b

Replace use of boost::trim use with locale-independent TrimString

Replace use of boost::trim_right with locale-independent TrimString

Note the only use of readStdin is fed to DecodeHexTx, which fails in
IsHex on non-hex characters as recorded in p_util_hexdigit.

tests: Add TrimString(...) tests

This is a partial backport of core#25001 and core#22859

Depends on D17150

Test Plan: ninja all check-all bitcoin-fuzzers

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Pieter Wuille <pieter@wuille.net>Authored on Apr 4 2022, 19:05
PiRKCommitted on Mon, Nov 18, 10:22
PiRKPushed on Mon, Nov 18, 10:22
Reviewer
Restricted Project
Differential Revision
D17151: Use std::string_view throughout util strencodings/string
Parents
rABC6d85d6304400: Make DecodeBase{32,64} take string_view arguments
Branches
Unknown
Tags
Unknown