2020-09-17 23:02:40 +03:00
|
|
|
// Copyright (c) Vitaliy Filippov, 2019+
|
2021-02-06 01:26:07 +03:00
|
|
|
// License: VNPL-1.1 (see README.md for details)
|
2020-09-17 23:02:40 +03:00
|
|
|
|
2020-04-11 12:04:10 +03:00
|
|
|
#pragma once
|
2022-07-15 02:19:35 +03:00
|
|
|
#include <stdint.h>
|
2020-04-11 12:04:10 +03:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
std::string base64_encode(const std::string &in);
|
|
|
|
std::string base64_decode(const std::string &in);
|
2022-07-15 02:19:35 +03:00
|
|
|
uint64_t parse_size(std::string size_str);
|
2022-08-06 02:04:58 +03:00
|
|
|
std::string strtolower(const std::string & in);
|
|
|
|
std::string trim(const std::string & in);
|
2022-08-12 01:58:28 +03:00
|
|
|
std::string str_replace(const std::string & in, const std::string & needle, const std::string & replacement);
|
2022-07-15 02:19:35 +03:00
|
|
|
uint64_t stoull_full(const std::string & str, int base = 0);
|
|
|
|
std::string format_size(uint64_t size, bool nobytes = false);
|
2022-07-31 01:10:05 +03:00
|
|
|
void print_help(const char *help_text, std::string exe_name, std::string cmd, bool all);
|