Audio Processing Framework (APF) version 0.5.0
Namespaces | Functions
stringtools.h File Reference

Helper functions for string conversion. More...

#include <string>
#include <sstream>
#include <stdexcept>

Go to the source code of this file.

Namespaces

namespace  apf
 Audio Processing Framework.
 
namespace  apf::str
 Helper functions for string manipulation.
 

Functions

template<typename T >
std::string apf::str::A2S (const T &input)
 Converter "Anything to String". More...
 
template<typename out_T >
bool apf::str::convert (std::istream &input, out_T &output)
 Convert a stream to a given type. More...
 
bool apf::str::convert (std::istream &input, bool &output)
 This is a overloaded function for boolean output. More...
 
template<typename out_T >
bool apf::str::S2A (const std::string &input, out_T &output)
 Converter "String to Anything". More...
 
bool apf::str::S2A (const std::string &input, std::string &output)
 Overloaded function with a std::string as output. More...
 
template<typename out_T >
out_T apf::str::S2RV (const std::string &input, out_T def)
 Converter "String to Return Value". More...
 
std::string apf::str::S2RV (const std::string &input, const char *def)
 Overloaded function with C-string as default value. More...
 
template<typename out_T , typename in_T >
out_T apf::str::S2RV (const in_T &input)
 Throwing version of S2RV(). More...
 
template<typename char_T , typename traits >
std::basic_ios< char_T, traits > & apf::str::clear_iostate_except_eof (std::basic_ios< char_T, traits > &stream)
 Clear the state of a stream but leave eofbit as is. More...
 
template<int digits, typename char_T , typename traits , typename out_T >
std::basic_istream< char_T, traits > & apf::str::convert_chars (std::basic_istream< char_T, traits > &input, out_T &output)
 Remove a specified number of characters from a stream and convert them to a numeric type. More...
 
template<typename char_T , typename traits >
std::basic_istream< char_T, traits > & apf::str::remove_char (std::basic_istream< char_T, traits > &input, const char_T character)
 Remove a character from a stream and check if it is the one given as parameter. More...
 
template<typename char_T , typename traits >
std::basic_istream< char_T, traits > & apf::str::remove_colon (std::basic_istream< char_T, traits > &input)
 Remove a colon from an input stream. More...
 
template<template< typename, typename, typename > class in_T, typename char_T , typename traits , typename Allocator , typename out_T >
bool apf::str::string2time (const in_T< char_T, traits, Allocator > &input, out_T &output)
 Convert time string to numeric value in seconds. More...
 
template<typename char_T , typename out_T >
bool apf::str::string2time (const char_T *input, out_T &output)
 Overloaded function for a character array. More...
 

Detailed Description

Helper functions for string conversion.

Definition in file stringtools.h.