aboutsummaryrefslogtreecommitdiff
path: root/src/utilstrencodings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986)practicalswift2018-11-291-0/+1
| | | | | Github-Pull: #14618 Rebased-From: ab8c6f24d28ea1d1e6258cf316b4b97a0baf2377
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* Removes Boost predicate.hpp dependency2512018-07-221-5/+5
| | | | | | | | | | | | | This is a squashed commit that squashes the following commits: This commit removes the `boost/algorithm/string/predicate.hpp` dependenc from the project by replacing the function calls to `boost::algorithm::starts_with` `boost::algorithm::ends_with` and `all` with respectively C++11' `std::basic_string::front`, `std::basic_string::back`, `std::all_of` function calls This commit replaces `boost::algorithm::is_digit` with a locale independent isdigi function, because the use of the standard library's `isdigit` and `std::isdigit functions is discoraged in the developer notes
* Simplify Base32 and Base64 conversionsPieter Wuille2018-03-071-243/+54
|
* Remove useless string initialization.Alin Rus2018-02-131-2/+2
|
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
* Allow setting nMinimumChainWork on command lineSuhas Daftuar2017-09-051-0/+13
|
* scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift2017-08-071-6/+6
| | | | | | | | | | | | | instead of the macro NULL -BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp -END VERIFY SCRIPT-
* Merge #10812: [utils] Allow bitcoin-cli's -rpcconnect option to be used with ↵Pieter Wuille2017-07-151-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | square brackets 5c643241e [utils] allow square brackets for ipv6 addresses in bitcoin-cli (John Newbery) fe4fabaf1 [refactor] move SplitHostPort() into utilstrencodings (John Newbery) Pull request description: bitcoin-cli's `-rpcconnect` can accept ipv6 addresses (as long as the libevent version is new enough), but fails to parse ipv6 with square brackets. This PR makes `bitcoin-cli` parse ipv6 in square brackets correctly. `bitcoin-cli -rpcconnect=[::1] <command>` should now be equivalent to `bitcoin-cli -rpcconnect=::1 <command>` This is useful so the `bitcoin-cli` option can now be in the same format as the `bitcoind` option. Doesn't include tests. I have a branch that fully tests `bitcoin-cli`, but that's queued behind several intermediate PRs. - first commit moves `SplitHostPort()` from libbitcoin_common into libbitcoin_util - second commit adds proper ipv6 parsing to bitcoin-cli Tree-SHA512: 249d409f10360c989474283341f458cc97364a56a7d004ae6d5f13d8bffe3a51b5dc2484d42218848e2d42cd9c0b13a1b92e94ea19b209f7e91c875c208d8409
| * [refactor] move SplitHostPort() into utilstrencodingsJohn Newbery2017-07-121-0/+19
| | | | | | | | | | This moves SplitHostPort from libbitcoin_common to libbitcoin_util so it is available to bitcoin-cli.
* | Remove unnecessary branches in utilstrencodings string constructors.Jeremy Rubin2017-07-081-2/+2
| |
* | Fix subscript[0] in utilstrencodings.cppJeremy Rubin2017-07-081-2/+2
|/
* Fixed multiple typosDimitris Tsapakidis2017-06-221-4/+4
| | | | | | | A few "a->an" and "an->a". "Shows, if the supplied default SOCKS5 proxy" -> "Shows if the supplied default SOCKS5 proxy". Change made on 3 occurrences. "without fully understanding the ramification of a command" -> "without fully understanding the ramifications of a command". Removed duplicate words such as "the the".
* Refactor: Remove using namespace <xxx> from util*Karl-Johan Alm2017-03-081-26/+24
|
* Wallet: Sanitise -wallet parameterLuke Dashjr2017-02-271-1/+2
|
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* util: Add ParseUInt32 and ParseUInt64Wladimir J. van der Laan2016-06-081-0/+34
| | | | | | | | | | Add error and range-checking parsers for unsigned 32 and 64 bit numbers. The 32-bit variant is required for parsing sequence numbers from the command line in `bitcoin-tx` (see #8164 for discussion). I've thrown in the 64-bit variant as a bonus, as I'm sure it will be needed at some point. Also adds tests, and updates `developer-notes.md`.
* Merge branch 'master' into single_prodnameLuke Dashjr2016-02-031-1/+1
|\
| * Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
| |
* | Rewrite FormatParagraph to handle newlines within input strings correctlyLuke Dashjr2016-02-031-25/+31
|/
* SanitizeString: Allow hypen charMarcoFalke2015-09-231-2/+2
|
* [uacomment] Sanitize per BIP-0014MarcoFalke2015-09-161-7/+10
| | | | | | * SanitizeString() can be requested to be more strict * Throw error when SanitizeString() changes uacomments * Fix tests
* util: use locale-independent parsing in ParseDoubleWladimir J. van der Laan2015-07-181-5/+6
| | | | | | Use locale-indepent C++ based parsing instead of C's strtod, which checks for different input based on the user's locale. Fixes #6443.
* rpc: Accept scientific notation for monetary amounts in JSONWladimir J. van der Laan2015-07-101-0/+120
| | | | | | | | | | | Add a function `ParseFixedPoint` that parses numbers according to the JSON number specification and returns a 64-bit integer. Then this in `AmountFromValue`, rather than `ParseMoney`. Also add lots of tests (thanks to @jonasschnelli for some of them). Fixes issue #6297.
* use const references where appropriatePhilip Kaufmann2015-06-041-1/+1
|
* util: Add ParseInt64 and ParseDouble functionsWladimir J. van der Laan2015-06-041-1/+42
| | | | | | | | | | | Strict parsing functions for other numeric types. - ParseInt64 analogous to ParseInt32, but for 64-bit values. - ParseDouble for doubles. - Make all three Parse* functions more strict (e.g. reject whitespace on the inside) Also add tests.
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Format paragraphs properly - count the space between words.Pavel Janík2014-12-061-1/+1
|
* libbitcoinconsensus: don't require any global constructorsCory Fields2014-11-241-5/+5
| | | | These static objects are only used in once place, so declare them there instead.
* Update comments in util to be doxygen compatibleMichael Ford2014-11-171-3/+5
|
* minor cleanup: include orders, end comments etc.Philip Kaufmann2014-10-311-2/+2
| | | | - no code changes
* boost: drop boost dependency in utilstrencodings.cppCory Fields2014-10-151-4/+4
|
* SanitizeString: allow '(' and ')'Wladimir J. van der Laan2014-09-251-1/+1
| | | | | | | '(' and ')' are valid in user agent strings, so should be reported as such in RPC `getpeerinfo`. Fixes #4537.
* Fixing 'vector out of bounds' issue in base 32 and 64ENikS2014-09-181-2/+2
|
* header include cleanupPhilip Kaufmann2014-09-141-1/+2
| | | | - ensures alphabetical ordering for includes etc. in source file headers
* Split up util.cpp/hWladimir J. van der Laan2014-08-261-0/+496
Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.