MEPP2 Project
Functions
FEVV::StrUtils Namespace Reference

Functions

std::vector< std::string > split (const std::string &str, const std::string &delims, bool keep_empty_tokens=false)
 
bool is_equal (const std::string &str1, const std::string &str2)
 
template<typename ConvertType >
void convert (const std::string &str, ConvertType &elem)
 
template<typename ConvertType >
ConvertType convert (const std::string &str)
 
template<typename ScalarType >
void convert (const ScalarType &s, std::string &st)
 
template<typename ScalarType >
std::string convert (const ScalarType &s)
 
bool starts_with (const std::string &str, const std::string &prefix)
 

Function Documentation

◆ convert() [1/4]

template<typename ScalarType >
std::string FEVV::StrUtils::convert ( const ScalarType &  s)

Convert a data into a string.

Definition at line 116 of file StringUtilities.hpp.

◆ convert() [2/4]

template<typename ScalarType >
void FEVV::StrUtils::convert ( const ScalarType &  s,
std::string &  st 
)

Convert a data into a string.

Definition at line 104 of file StringUtilities.hpp.

◆ convert() [3/4]

template<typename ConvertType >
ConvertType FEVV::StrUtils::convert ( const std::string &  str)

Convert a string into another type.

Definition at line 92 of file StringUtilities.hpp.

Here is the call graph for this function:

◆ convert() [4/4]

template<typename ConvertType >
void FEVV::StrUtils::convert ( const std::string &  str,
ConvertType &  elem 
)

Convert a string into another type.

Definition at line 81 of file StringUtilities.hpp.

Here is the caller graph for this function:

◆ is_equal()

bool FEVV::StrUtils::is_equal ( const std::string &  str1,
const std::string &  str2 
)
inline

Returns true if the two strings are identical.

Definition at line 71 of file StringUtilities.hpp.

◆ split()

std::vector< std::string > FEVV::StrUtils::split ( const std::string &  str,
const std::string &  delims,
bool  keep_empty_tokens = false 
)
inline

Split a string according to the provided delimiters.

Definition at line 35 of file StringUtilities.hpp.

Here is the caller graph for this function:

◆ starts_with()

bool FEVV::StrUtils::starts_with ( const std::string &  str,
const std::string &  prefix 
)
inline

Check if string str starts with string prefix.

Definition at line 128 of file StringUtilities.hpp.