mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
util: refactor upper/lowercase functions
This includes renaming Downcase() to ToLower() and make it return a string rather than modify referenced arg. Also adds ToUpper() string version.
This commit is contained in:
parent
e5fdda68c6
commit
0481fa2584
6 changed files with 48 additions and 24 deletions
|
|
@ -37,8 +37,8 @@ bool fNameLookup = DEFAULT_NAME_LOOKUP;
|
|||
static const int SOCKS5_RECV_TIMEOUT = 20 * 1000;
|
||||
static std::atomic<bool> interruptSocks5Recv(false);
|
||||
|
||||
enum Network ParseNetwork(std::string net) {
|
||||
Downcase(net);
|
||||
enum Network ParseNetwork(const std::string& net_in) {
|
||||
std::string net = ToLower(net_in);
|
||||
if (net == "ipv4") return NET_IPV4;
|
||||
if (net == "ipv6") return NET_IPV6;
|
||||
if (net == "onion") return NET_ONION;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue