Loading...
Searching...
No Matches
Functions
bbm::string Namespace Reference

Functions

std::string remove_whitespace (const std::string &str)
 remove the white space at the front and back of a string
 
std::string remove_brackets (const std::string &str)
 remove surrounding backets
 
std::string remove_comment (const std::string &str, const std::string &comment_marker)
 Remove comments from string.
 
std::pair< std::string, std::string > get_keyword (const std::string &str)
 Return the keyword substring appearing an open bracket, and the arguments appearing in the brackets: e.g., keyword(arguments)
 
std::pair< std::string, std::string > split_eq (const std::string &str)
 split a string of the form "key = val" in key and value. If no '=', then return an empty key.
 
std::vector< std::string > split_args (const std::string &str)
 Split a string based on comma's if not surrounded by brackets.
 

Function Documentation

◆ get_keyword()

std::pair< std::string, std::string > get_keyword ( const std::string &  str)

Return the keyword substring appearing an open bracket, and the arguments appearing in the brackets: e.g., keyword(arguments)

◆ remove_brackets()

std::string remove_brackets ( const std::string &  str)

remove surrounding backets

◆ remove_comment()

std::string remove_comment ( const std::string &  str,
const std::string &  comment_marker 
)

Remove comments from string.

◆ remove_whitespace()

std::string remove_whitespace ( const std::string &  str)

remove the white space at the front and back of a string

◆ split_args()

std::vector< std::string > split_args ( const std::string &  str)

Split a string based on comma's if not surrounded by brackets.

◆ split_eq()

std::pair< std::string, std::string > split_eq ( const std::string &  str)

split a string of the form "key = val" in key and value. If no '=', then return an empty key.