#include <attributes.h>
#include <algorithm>
#include <array>
#include <cstring>
#include <locale>
#include <sstream>
#include <string>
#include <vector>
Go to the source code of this file.
|  | 
| std::string | TrimString (const std::string &str, const std::string &pattern=" \f\n\r\t\v") | 
|  | 
| std::string | RemovePrefix (const std::string &str, const std::string &prefix) | 
|  | 
| template<typename T , typename BaseType , typename UnaryOp > | 
| auto | Join (const std::vector< T > &list, const BaseType &separator, UnaryOp unary_op) -> decltype(unary_op(list.at(0))) | 
|  | Join a list of items.  More... 
 | 
|  | 
| template<typename T > | 
| T | Join (const std::vector< T > &list, const T &separator) | 
|  | 
| std::string | Join (const std::vector< std::string > &list, const std::string &separator) | 
|  | 
| std::string | MakeUnorderedList (const std::vector< std::string > &items) | 
|  | Create an unordered multi-line list of items.  More... 
 | 
|  | 
| bool | ValidAsCString (const std::string &str) noexcept | 
|  | Check if a string does not contain any embedded NUL (\0) characters.  More... 
 | 
|  | 
| template<typename T > | 
| std::string | ToString (const T &t) | 
|  | Locale-independent version of std::to_string.  More... 
 | 
|  | 
| template<typename T1 , size_t PREFIX_LEN> | 
| bool | HasPrefix (const T1 &obj, const std::array< uint8_t, PREFIX_LEN > &prefix) | 
|  | Check whether a container begins with the given prefix.  More... 
 | 
|  | 
◆ HasPrefix()
template<typename T1 , size_t PREFIX_LEN> 
  
  | 
        
          | bool HasPrefix | ( | const T1 & | obj, |  
          |  |  | const std::array< uint8_t, PREFIX_LEN > & | prefix |  
          |  | ) |  |  |  | inline | 
 
Check whether a container begins with the given prefix. 
Definition at line 99 of file string.h.
 
 
◆ Join() [1/3]
  
  | 
        
          | std::string Join | ( | const std::vector< std::string > & | list, |  
          |  |  | const std::string & | separator |  
          |  | ) |  |  |  | inline | 
 
 
◆ Join() [2/3]
template<typename 
T , typename BaseType , typename UnaryOp > 
        
          | auto Join | ( | const std::vector< T > & | list, | 
        
          |  |  | const BaseType & | separator, | 
        
          |  |  | UnaryOp | unary_op | 
        
          |  | ) |  | -> decltype(unary_op(list.at(0))) | 
      
 
Join a list of items. 
- Parameters
- 
  
    | list | The list to join |  | separator | The separator |  | unary_op | Apply this operator to each item in the list |  
 
Definition at line 44 of file string.h.
 
 
◆ Join() [3/3]
      
        
          | T Join | ( | const std::vector< T > & | list, | 
        
          |  |  | const T & | separator | 
        
          |  | ) |  |  | 
      
 
 
◆ MakeUnorderedList()
  
  | 
        
          | std::string MakeUnorderedList | ( | const std::vector< std::string > & | items | ) |  |  | inline | 
 
Create an unordered multi-line list of items. 
Definition at line 70 of file string.h.
 
 
◆ RemovePrefix()
  
  | 
        
          | std::string RemovePrefix | ( | const std::string & | str, |  
          |  |  | const std::string & | prefix |  
          |  | ) |  |  |  | inline | 
 
 
◆ ToString()
      
        
          | std::string ToString | ( | const T & | t | ) |  | 
      
 
Locale-independent version of std::to_string. 
Definition at line 87 of file string.h.
 
 
◆ TrimString()
  
  | 
        
          | std::string TrimString | ( | const std::string & | str, |  
          |  |  | const std::string & | pattern = " \f\n\r\t\v" |  
          |  | ) |  |  |  | inline | 
 
 
◆ ValidAsCString()
  
  | 
        
          | bool ValidAsCString | ( | const std::string & | str | ) |  |  | inlinenoexcept | 
 
Check if a string does not contain any embedded NUL (\0) characters. 
Definition at line 78 of file string.h.