File strings.hpp

Functions

static inline std::string &convertToLowerCase(std::string &string)

Converts a given string into lower-case characters.

Parameters:

string – A reference to an std::string that should be modified

Returns:

A reference to the modified string

static inline std::string replaceRegex(const std::string &string, const std::string &regex, const std::string &replacement)

Replaces all substrings in a given string matching a specific regular expression with a replacement string.

Parameters:
  • string – A reference to an std::string that should be modified

  • regex – A reference to an std::string that specifies the regular expression

  • replacement – A reference to an std::string to replace matches with

Returns:

The modified string

static inline std::string replaceWhitespace(const std::string &string, const std::string &replacement)

Replaces all whitespace in a given string with a replacement string.

Parameters:
  • string – A reference to an std:.string that should be modified

  • replacement – A reference to an std::string to replace whitespace with

Returns:

The modified string