LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Functions
LibCarna::base::text Namespace Reference

Provides text-related helper functions. More...

Functions

std::string cat (const std::string &file)
 Reads file in text mode and returns contents.
 
template<typename To , typename From >
To lexical_cast (const From &from)
 Performs lexical cast.
 

Detailed Description

Provides text-related helper functions.

Function Documentation

◆ lexical_cast()

template<typename To , typename From >
To LibCarna::base::text::lexical_cast ( const From from)

Performs lexical cast.

Example:

const unsigned int i = 3;
const std::string s = lexical_cast< std::string >( i );
const unsigned int j = lexical_cast< unsigned int >( s );
#define LIBCARNA_ASSERT(expression)
If the given expression is false, a break point is raised in debug mode and an AssertionFailure throw...
Represents an association.
To lexical_cast(const From &from)
Performs lexical cast.
Definition text.hpp:72

Definition at line 72 of file text.hpp.