Basic features provided here in order to avoid overkill dependencies.
More...
#include <codac_Tools.h>
|
static void | replace_all (std::string &input, const std::string &search, const std::string &format) |
| Replaces all occurrences of the search string in the input with the format string. The input sequence is modified in-place.
|
|
static void | trim (std::string &str) |
| Trims a string (removes both leading and trailing whitespace from the string)
|
|
static double | rand_in_bounds (const Interval &intv) |
| Returns a random number inside an interval.
|
|
Basic features provided here in order to avoid overkill dependencies.
◆ replace_all()
static void codac::Tools::replace_all |
( |
std::string & | input, |
|
|
const std::string & | search, |
|
|
const std::string & | format ) |
|
static |
Replaces all occurrences of the search string in the input with the format string. The input sequence is modified in-place.
- Note
- Same signature as boost::algorithm::replace_all
- Parameters
-
input | an input string |
search | a substring to be searched for |
format | a substitute string |
- Returns
- void
◆ trim()
static void codac::Tools::trim |
( |
std::string & | str | ) |
|
|
static |
Trims a string (removes both leading and trailing whitespace from the string)
- Parameters
-
- Returns
- void
◆ rand_in_bounds()
static double codac::Tools::rand_in_bounds |
( |
const Interval & | intv | ) |
|
|
static |
Returns a random number inside an interval.
- Parameters
-
- Returns
- a random double
The documentation for this class was generated from the following file: