Calico
 All Classes Namespaces Files Functions Variables Typedefs Friends Groups
string.hpp File Reference

Functions and types related to string-manipulation. More...

#include <cstddef>
#include <cstdio>
#include <iterator>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>

Classes

class  cal::null_terminated_iterator< T >
 A ForwardIterator that traverses a null-terminated array. More...
 

Namespaces

 cal
 Primary namespace.
 

Functions

template<class... T>
std::string cal::format_str (const char *format, T &&...t)
 Returns a formatted string similar to sprintf but without all the hassle of memory management. More...
 
template<class T >
null_terminated_iterator< T > cal::null_terminated_begin (T *ptr)
 Returns a ForwardIterator to the first element of a null-terminated array. More...
 
template<class T >
null_terminated_iterator< T > cal::null_terminated_end (T *ptr)
 Returns a past-the-end ForwardIterator for a null-terminated array. More...
 
template<class T >
cal::parse (const std::string &s)
 Extracts an object of type T from a string using the stream extraction operator (>>).
 
template<class T >
cal::parse (const char *s)
 Extracts an object of type T from a string using the stream extraction operator (>>).
 
template<class T >
std::vector< T > cal::str_to_vector (const std::basic_string< T > &s)
 Returns a copy of the given string as a vector of characters. More...
 
std::string cal::to_string (const std::string &s)
 Returns a copy of the same string.
 
std::string cal::to_string (const char *s)
 Converts a null-terminated string to an std::string.
 
std::string cal::to_string (char c)
 Converts a character to a string.
 
template<class T >
std::string cal::to_string (const T &x)
 Constructs a string representation of an object using the stream insertion operator (<<).
 

Detailed Description

Functions and types related to string-manipulation.