cpp-bencoding
Namespaces
Utils.h File Reference

Utilities. More...

#include <ios>
#include <istream>
#include <queue>
#include <sstream>
#include <stack>
#include <string>

Go to the source code of this file.

Namespaces

 bencoding
 Main namespace of the bencoding library.
 

Functions

Conversions
template<typename N >
bool bencoding::strToNum (const std::string &str, N &num, std::ios_base &(*format)(std::ios_base &)=std::dec)
 Converts the given string into a number. More...
 
Data Reading
bool bencoding::readUpTo (std::istream &stream, std::string &readData, char sentinel)
 Reads data from the given stream up to sentinel, which is left in stream. More...
 
bool bencoding::readUntil (std::istream &stream, std::string &readData, char last)
 Reads data from the given stream until last, which is also read. More...
 
String Operations
std::string bencoding::replace (const std::string &str, char what, const std::string &withWhat)
 Replaces all occurrences of what with withWhat in str and returns the resulting string. More...
 

Detailed Description

Utilities.

License BSD, see the LICENSE file for more details