mstring  1.3.1
Generates C++ message functions and classes from localized message definitions
MUtil.cpp File Reference
#include "MUtil.hh"
#include <ostream>
+ Include dependency graph for MUtil.cpp:

Functions

std::string Trim (const std::string &str)
 str without leading and trailing blanks (space, tab, CR). More...
 
void WriteStringLiteral (std::ostream &stream, const std::string &text, const std::string &indent, std::string::size_type hang)
 Write text as a C++ string literal. After every embedded newline the literal is closed and continued on the next output line, indented by indent plus hang spaces, so multi-line texts stay readable. More...
 

Function Documentation

◆ Trim()

std::string Trim ( const std::string &  str)

str without leading and trailing blanks (space, tab, CR).

Referenced by MStringParser::errorDirective(), MStringParser::includeDirective(), MStringParser::macro(), MStringParser::readRestOfLine(), and MStringParser::usingDirective().

+ Here is the caller graph for this function:

◆ WriteStringLiteral()

void WriteStringLiteral ( std::ostream &  stream,
const std::string &  text,
const std::string &  indent,
std::string::size_type  hang 
)

Write text as a C++ string literal. After every embedded newline the literal is closed and continued on the next output line, indented by indent plus hang spaces, so multi-line texts stay readable.

Referenced by TextElementsWriter::operator()().

+ Here is the caller graph for this function: