xoreos  0.0.5
Namespaces | Functions
strutil.h File Reference

Utility templates and functions for working with strings and streams. More...

#include "src/common/types.h"
Include dependency graph for strutil.h:

Go to the source code of this file.

Namespaces

 Common
 

Functions

void Common::printDataHex (SeekableReadStream &stream, size_t size=SIZE_MAX)
 Print a quick hex dump of the given data. More...
 
void Common::printDataHex (const byte *data, size_t size)
 Print a quick hex dump of the given data. More...
 
UString Common::debugTag (uint32 tag, bool trim=false)
 Create an elaborate string from an integer tag, for debugging purposes. More...
 
template<typename T >
void Common::parseString (const UString &str, T &value, bool allowEmpty=false)
 Parse a string into any POD integer, float/double or bool type. More...
 
template<typename T >
UString Common::composeString (T value)
 Convert any POD integer, float/double or bool type into a string. More...
 
size_t Common::searchBackwards (SeekableReadStream &haystack, const byte *needle, size_t needleSize, size_t maxReadBack=SIZE_MAX)
 Search the stream, backwards, for the last occurrence of a set of bytes. More...
 

Detailed Description

Utility templates and functions for working with strings and streams.

Definition in file strutil.h.