#include "../../../../NameSpaceDef/namespaces.hpp"
#include "../../lib/logging/AyonLogger.hpp"
#include <cstdlib>
#include <map>
#include <string>
#include <utility>
#include <vector>
Go to the source code of this file.
|
| YNPUT_CORE_IOSTD_NAMESPACE_OPEN std::string | getEnvKey (const std::string &envKey) |
| | get the value of an environment key in string format More...
|
| |
| std::string | cleanEnvKey (std::string &dirtyKey) |
| | cleans an given environment key from any hidden characters line brakes and similar More...
|
| |
| std::vector< std::string > | split (const std::string &str, char delimiter) |
| | splits a given string string via a given delimiter. More...
|
| |
| std::vector< std::string > | getEnvArray (const std::string &envKey) |
| | split an env key into an std vector. More...
|
| |
| std::map< std::string, std::string > | getEnvMap (const std::string &envKey) |
| | split an environment key into a std::map delimiter = , key value definition = {key}={value} More...
|
| |
◆ cleanEnvKey()
| std::string cleanEnvKey |
( |
std::string & |
dirtyKey | ) |
|
cleans an given environment key from any hidden characters line brakes and similar
- Parameters
-
- Returns
- will return a clean Env Key
◆ getEnvArray()
| std::vector< std::string > getEnvArray |
( |
const std::string & |
envKey | ) |
|
split an env key into an std vector.
array definition. Delimiter ","
- Parameters
-
◆ getEnvKey()
get the value of an environment key in string format
- Parameters
-
| envKey | the name of the environment key |
- Returns
- std::string env key value or empty std::string if envKey == nullptr
◆ getEnvMap()
| std::map< std::string, std::string > getEnvMap |
( |
const std::string & |
envKey | ) |
|
split an environment key into a std::map delimiter = , key value definition = {key}={value}
- Parameters
-
- Returns
◆ split()
| std::vector< std::string > split |
( |
const std::string & |
str, |
|
|
char |
delimiter |
|
) |
| |
splits a given string string via a given delimiter.
useful for splitting Env keys that should be used as a vector or an Map
- Parameters
-
| str | input String to be split |
| delimiter | delimiter used to split the string |
- Returns
- vector of elements resulting from splitting the string by the delimiter. the delimiter will be removed