Minsky
str.h File Reference
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <memory>
#include <string.h>
#include <xvector.h>
Include dependency graph for str.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  minsky::OnStackExit< F >
 arrange for a functional to be called on stack exit More...
 
struct  minsky::GetUtf8Char
 

Namespaces

 minsky
 Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky's state changes.
 

Functions

template<class T >
std::string minsky::str (T x)
 utility function to create a string representation of a numeric type More...
 
bool minsky::IsNotalnum (char x)
 
void minsky::stripNonAlnum (std::string &x)
 
std::string minsky::trimWS (const std::string &s)
 
std::string minsky::stripActive (const std::string &s)
 repaces characters that cause interpretation by TCL, backslashes are replaced by the set minus operator ∖, and spaces are replaced by ␣, as they cause problems More...
 
template<class F >
OnStackExit< F > minsky::onStackExit (F f)
 generator function More...
 
template<class T , class V >
void minsky::remove (std::vector< T > &x, const V &v)
 remove an element from a vector. V must be comparable to a T More...
 
template<class T , class D >
std::unique_ptr< T, D > minsky::uniqueDeleter (T *x, D d)
 
unsigned minsky::numBytes (unsigned char x)
 a wrapper around std::ofstream that checks the write succeeded, throwing an exception if not More...
 
size_t minsky::prevIndex (const std::string &str, size_t index)
 return index of previous character to index More...
 
std::istream & minsky::operator>> (std::istream &i, const GetUtf8Char &g)
 
void minsky::stripByteOrderingMarker (std::istream &s)
 checks if the input stream has the UTF-8 byte ordering marker, and removes it if present More...
 
std::string minsky::CSVQuote (const std::string &x, char sep)
 quotes a string if it contains a separator character, and double quotes quotes More...