preCICE v3.1.2
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions
String.hpp File Reference
#include <algorithm>
#include <array>
#include <sstream>
#include <string>
#include <vector>
Include dependency graph for String.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  precice::utils::StringMaker< MAX >
 Utility class to build a string from C functions with output pointers and static maximum length. More...
 
struct  precice::utils::StringMatch
 

Namespaces

namespace  precice
 Main namespace of the precice library.
 
namespace  precice::utils
 contains precice-related utilities.
 

Macros

#define PRECICE_AS_STRING(message)
 Turns stream-like code into a std::string.
 

Functions

std::string precice::utils::wrapText (const std::string &text, int linewidth, int indentation)
 
std::stringprecice::utils::checkAppendExtension (std::string &filename, const std::string &extension)
 Checks if filename has the given extension, if not appends it.
 
bool precice::utils::convertStringToBool (std::string const &value)
 Evaluates a string to find out if it represents a bool.
 
std::string precice::utils::truncate_wstring_to_string (std::wstring wstr, char fill)
 
std::size_t precice::utils::editDistance (std::string_view s1, std::string_view s2)
 
template<class Container >
std::vector< StringMatchprecice::utils::computeMatches (std::string_view given, const Container &expected)
 

Macro Definition Documentation

◆ PRECICE_AS_STRING

#define PRECICE_AS_STRING ( message)
Value:
[&] { \
oss << message; \
return oss.str(); \
}()
T str(T... args)

Turns stream-like code into a std::string.

Definition at line 72 of file String.hpp.