(986a3bf)
Go to the source code of this file.
|  | 
| static void | addToken (StringVect &tokens, std::string str) A_INLINE | 
|  | 
| static size_t | findNextQuote (const std::string &str, const char quote, const size_t pos) A_INLINE | 
|  | 
| static size_t | findNextSplit (const std::string &str, const std::string &separator, const char quote) A_INLINE | 
|  | 
| bool | splitParameters (StringVect &tokens, std::string text, const std::string &separator, const char quote) | 
|  | 
◆ addToken()
  
  | 
        
          | static void addToken | ( | StringVect & | tokens, |  
          |  |  | std::string | str |  
          |  | ) |  |  |  | inlinestatic | 
 
Definition at line 30 of file parameters.cpp.
   33     std::string item = 
trim(str);
 
   34     const size_t sz = item.size();
 
   38             str[sz - 1] == 
'\"' &&
 
   41             item = item.substr(1, sz - 2);
 
   43             tokens.push_back(item);
 
   49         tokens.push_back(item);
 
std::string trim(std::string const &str)
std::string & replaceAll(std::string &context, const std::string &from, const std::string &to)
 
References replaceAll(), and Catch::trim().
Referenced by splitParameters().
 
 
◆ findNextQuote()
  
  | 
        
          | static size_t findNextQuote | ( | const std::string & | str, |  
          |  |  | const char | quote, |  
          |  |  | const size_t | pos |  
          |  | ) |  |  |  | inlinestatic | 
 
Definition at line 55 of file parameters.cpp.
   59     size_t idx = str.find(quote, pos);
 
   61            idx != std::string::npos &&
 
   64         idx = str.find(quote, idx + 1);
 
 
Referenced by findNextSplit().
 
 
◆ findNextSplit()
  
  | 
        
          | static size_t findNextSplit | ( | const std::string & | str, |  
          |  |  | const std::string & | separator, |  
          |  |  | const char | quote |  
          |  | ) |  |  |  | inlinestatic | 
 
Definition at line 72 of file parameters.cpp.
   80         size_t idx1 = 
findAny(str, separator, pos);
 
   83         if (idx2 == std::string::npos)  
 
   85         else if (idx1 == std::string::npos)  
 
   86             return std::string::npos;
 
   91             if (idx2 == std::string::npos)
 
   92                 return std::string::npos;  
 
static size_t findNextQuote(const std::string &str, const char quote, const size_t pos) A_INLINE
size_t findAny(const std::string &text, const std::string &chars, const size_t pos)
 
References findAny(), and findNextQuote().
Referenced by splitParameters().
 
 
◆ splitParameters()
      
        
          | bool splitParameters | ( | StringVect & | tokens, | 
        
          |  |  | std::string | text, | 
        
          |  |  | const std::string & | separator, | 
        
          |  |  | const char | quote | 
        
          |  | ) |  |  | 
      
 
Definition at line 103 of file parameters.cpp.
  110     while (idx != std::string::npos)
 
  112         std::string item = text.substr(0, idx);
 
  114         text = text.substr(idx + 1);
 
static size_t findNextSplit(const std::string &str, const std::string &separator, const char quote) A_INLINE
static void addToken(StringVect &tokens, std::string str) A_INLINE
 
References addToken(), and findNextSplit().