diff options
| author | Evsyukov Denis <[email protected]> | 2020-03-11 08:38:15 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-03-11 08:38:15 +0300 |
| commit | f90cd9a3ce6272e63edcaff4e423f7fd5401f50b (patch) | |
| tree | 33bfef32cfd03de5ea5e11e3cf125c9f9d16205d /src/functions.hpp | |
| parent | [+] added important note (diff) | |
| parent | [+] publish on tag (diff) | |
| download | archived-t-f90cd9a3ce6272e63edcaff4e423f7fd5401f50b.tar.xz archived-t-f90cd9a3ce6272e63edcaff4e423f7fd5401f50b.zip | |
Merge pull request #1 from juev/rust
Rust
Diffstat (limited to 'src/functions.hpp')
| -rw-r--r-- | src/functions.hpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/functions.hpp b/src/functions.hpp deleted file mode 100644 index 6b86197..0000000 --- a/src/functions.hpp +++ /dev/null @@ -1,35 +0,0 @@ -// -// Created by d.evsyukov on 09.01.2020. -// - -#ifndef T_FUNCTIONS_HPP -#define T_FUNCTIONS_HPP - -#include "sha256/picosha2.h" -#include <string> - -std::string <rim(std::string &str, const std::string &chars = "\t\n\v\f\r ") { - str.erase(0, str.find_first_not_of(chars)); - return str; -} - -std::string &rtrim(std::string &str, const std::string &chars = "\t\n\v\f\r ") { - str.erase(str.find_last_not_of(chars) + 1); - return str; -} - -std::string &trim(std::string &str, const std::string &chars = "\t\n\v\f\r ") { - return ltrim(rtrim(str, chars), chars); -} - -std::vector<std::string> split(const std::string &s, char delimiter) { - std::vector<std::string> tokens; - std::string token; - std::istringstream tokenStream(s); - while (std::getline(tokenStream, token, delimiter)) { - tokens.push_back(token); - } - return tokens; -} - -#endif // T_FUNCTIONS_HPP |