|
SSS - S3 Toolkit 0.9.6
S3 client library and applications
|
internal utility functions More...
#include <algorithm>#include <functional>#include <string>#include <unordered_map>
Include dependency graph for utility.h:
This graph shows which files directly or indirectly include this file:Data Structures | |
| class | sss::SplitIterator |
| Iterator over splits. More... | |
| class | sss::SplitRange |
| Range over splits. More... | |
Functions | |
| template<class ContainerT > | |
| void | sss::Split (const std::string &str, ContainerT &cont, const std::string &delims=" ", const size_t count=std::string::npos) |
| auto | sss::begin (const SplitRange &sr) |
| return iterator at start position | |
| auto | sss::end (const SplitRange &sr) |
| return iterator at end position | |
| int | sss::RandomIndex (int lowerBound, int upperBound) |
| size_t | sss::FileSize (const std::string &filename) |
| Toml | sss::ParseTomlFile (const std::string &filename) |
| std::string | sss::GetHomeDir () |
| void | sss::TrimLine (std::string &s) |
| std::string | sss::ToUpper (std::string s) |
| std::string | sss::ToLower (std::string s) |
internal utility functions
| size_t sss::FileSize | ( | const std::string & | filename | ) |
Return file size
| filename | file name |
References sss::FileSize().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string sss::GetHomeDir | ( | ) |
Return home directory
References sss::GetHomeDir().
Here is the call graph for this function:
Here is the caller graph for this function:| Toml sss::ParseTomlFile | ( | const std::string & | filename | ) |
Parse Toml file in AWS format and return tree as map of maps
Works with AWS format (nested s'=') Parent key is added added to child key: <parent key>/<child_key>'
| filename | location of configuration file |
References sss::GetHomeDir(), and sss::ParseTomlFile().
Here is the call graph for this function:
Here is the caller graph for this function:| int sss::RandomIndex | ( | int | lowerBound, |
| int | upperBound | ||
| ) |
Return integer in [low,high] range
| lowerBound | lower bound |
| upperBound | upper bound |
lowerBound, upperBound] References sss::RandomIndex().
Here is the call graph for this function:
Here is the caller graph for this function:| void sss::Split | ( | const std::string & | str, |
| ContainerT & | cont, | ||
| const std::string & | delims = " ", |
||
| const size_t | count = std::string::npos |
||
| ) |
Split string and put substrings into container
| [in] | str | input text |
| [out] | cont | container with push_back() method |
| [in] | delims | delimiter |
| [in] | count | number of delimiters to parse |
References sss::Split().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string sss::ToLower | ( | std::string | s | ) |
Convert to lowercase
| s | text |
References sss::ToLower().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string sss::ToUpper | ( | std::string | s | ) |
Convert to uppercase text
| s | text |
References sss::ToUpper().
Here is the call graph for this function:
Here is the caller graph for this function:| void sss::TrimLine | ( | std::string & | s | ) |
Remove leading '#' and leading and trailing blanks in place
References sss::TrimLine().
Here is the call graph for this function:
Here is the caller graph for this function: