G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsUtils.h File Reference

Several utility functions for miscellaneous tasks. More...

+ Include dependency graph for gsUtils.h:

Go to the source code of this file.

Classes

struct  type< T >
 Print name of template type as a string. More...
 

Namespaces

 gismo
 The G+Smo namespace, containing all definitions for the library.
 
 gismo::util
 the gsFuncData is a cache of pre-computed function sets values.
 
 util
 This namespace gathers several utility functions for miscellaneous tasks.
 

Functions

void capitalize (std::string &str)
 Capitalize string in situ.
 
bool ends_with (const std::string &haystack, const std::string &needle)
 Checks if a string haystack ends with the string needle.
 
template<typename T >
size_t hash_range (T const *start, const T *const end)
 Create hash key for a rangle of (integral) numbers.
 
std::string returnCapitalized (const std::string &str)
 Capitalize string.
 
bool starts_with (const std::string &haystack, const std::string &needle)
 Checks if a string haystack begins with the string needle.
 
double stod (const std::string &str)
 equivalent to std::stod(str)
 
int stoi (const std::string &str)
 equivalent to std::stoi(str), and therefore std::stoi(str, 0, 10)
 
void string_replace (std::string &str, const std::string &oldStr, const std::string &newStr)
 Replaces appearance of oldStr with newStr inside the string str.
 
template<typename C >
std::string to_string (const C &value)
 Converts value to string, assuming "operator<<" defined on C.
 

Detailed Description

Several utility functions for miscellaneous tasks.

This file is part of the G+Smo library.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Author(s): A. Mantzaflaris, Harald Weiner, J. Vogl