libatomprobe
Library for Atom Probe Tomography (APT) computation
Namespaces | Functions
stringFuncs.cpp File Reference
#include "atomprobe/helper/stringFuncs.h"
#include "atomprobe/helper/aptAssert.h"
#include <fstream>
#include <ctime>
Include dependency graph for stringFuncs.cpp:

Go to the source code of this file.

Namespaces

 AtomProbe
 

Functions

std::string AtomProbe::onlyFilename (const std::string &path)
 Return only the filename component. More...
 
std::string AtomProbe::onlyDir (const std::string &path)
 Return only the directory name component of the full path. More...
 
void AtomProbe::nullifyMarker (char *buffer, char marker)
 
void AtomProbe::ucharToHexStr (unsigned char c, std::string &s)
 
void AtomProbe::hexStrToUChar (const std::string &s, unsigned char &c)
 
std::string AtomProbe::digitString (unsigned int thisDigit, unsigned int maxDigit)
 Generate a string with leading digits up to maxDigit (eg, if maxDigit is 424, and thisDigit is 1. More...
 
std::string AtomProbe::stripWhite (const std::string &str)
 Strip whitespace, (eg tab,space) from either side of a string. More...
 
std::string AtomProbe::stripChars (const std::string &Str, const char *chars)
 
void AtomProbe::stripZeroEntries (std::vector< std::string > &s)
 
std::string AtomProbe::lowercase (std::string s)
 Return a lowercase version for a given string. More...
 
void AtomProbe::splitStrsRef (const char *cpStr, const char delim, std::vector< std::string > &v)
 Split string references using a single delimiter. More...
 
void AtomProbe::splitStrsRef (const char *cpStr, const char *delim, std::vector< std::string > &v)
 Split string references using any of a given string of delimiters. More...
 
bool AtomProbe::parseColString (const std::string &str, unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a)
 Parse a colour string containing rgb[a]; hex for with leading #. More...
 
void AtomProbe::genColString (unsigned char r, unsigned char g, unsigned char b, std::string &s)