mstring  1.3.1
Generates C++ message functions and classes from localized message definitions
MUtil.hh File Reference

Small string helpers shared by the parser and the writers. More...

#include <iosfwd>
#include <string>
+ Include dependency graph for MUtil.hh:
+ This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

Small string helpers shared by the parser and the writers.

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: