aboutsummaryrefslogtreecommitdiff
path: root/src/utilstrencodings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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.