|
WarpX
|
Classes | |
| class | SliceParser |
| This class is a parser for slices of the form i:j:k where i, j and k are integers representing respectively the starting point, the stopping point and the period. More... | |
| class | IntervalsParser |
| This class is a parser for multiple slices of the form x,y,z,... where x, y and z are slices of the form i:j:k, as defined in the SliceParser class. This class contains a vector of SliceParsers. More... | |
Functions | |
| void | goto_next_line (std::istream &is) |
| This function drops the rest of the current line of the input stream "is". | |
| template<typename Container> | |
| auto | split_string (std::string const &instr, std::string const &separator, bool const trim=false, std::string const &trim_space=" \t") |
| Splits a string using a string separator. This is somewhat similar to amrex::Tokenize. The main difference is that, if the separator ":" is used, amrex::Tokenize will split ":3::2" into ["3","2"] while this functio will split ":3::2" into ["","3","","2"]. This function can also perform a trimming to remove whitespaces (or any other arbitrary string) from the split string. | |
| std::vector< std::string > | automatic_text_wrap (const std::string &text, int max_line_length) |
| This function performs automatic text wrapping on a string, returning an array of strings each not exceeding the maximum line length (unless the text contains a word exceeding the maximum line length). | |
| std::vector< std::string > ablastr::utils::text::automatic_text_wrap | ( | const std::string & | text, |
| int | max_line_length ) |
This function performs automatic text wrapping on a string, returning an array of strings each not exceeding the maximum line length (unless the text contains a word exceeding the maximum line length).
| [in] | text | the string containing the text to be wrapped |
| [in] | max_line_length | the maximum line length |
| void ablastr::utils::text::goto_next_line | ( | std::istream & | is | ) |
This function drops the rest of the current line of the input stream "is".
| [in,out] | is | the input stream |
| auto ablastr::utils::text::split_string | ( | std::string const & | instr, |
| std::string const & | separator, | ||
| bool const | trim = false, | ||
| std::string const & | trim_space = " \t" ) |
Splits a string using a string separator. This is somewhat similar to amrex::Tokenize. The main difference is that, if the separator ":" is used, amrex::Tokenize will split ":3::2" into ["3","2"] while this functio will split ":3::2" into ["","3","","2"]. This function can also perform a trimming to remove whitespaces (or any other arbitrary string) from the split string.
| Container | the type of the split string. |
| [in] | instr | the input string |
| [in] | separator | the separator string |
| [in] | trim | true to trim the split string, false otherwise. |
| [in] | trim_space | the string to trim if trim is true. |