codac 1.5.6
Loading...
Searching...
No Matches
codac::Tools Class Reference

Basic features provided here in order to avoid overkill dependencies. More...

#include <codac_Tools.h>

Static Public Member Functions

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.
 

Detailed Description

Basic features provided here in order to avoid overkill dependencies.

Member Function Documentation

◆ 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
inputan input string
searcha substring to be searched for
formata 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
strthe string to trim
Returns
void

◆ rand_in_bounds()

static double codac::Tools::rand_in_bounds ( const Interval & intv)
static

Returns a random number inside an interval.

Parameters
intvthe bounds
Returns
a random double

The documentation for this class was generated from the following file: