Go to the documentation of this file.
48 ss <<
std::fixed << std::setprecision(numPrecision) << v;
61 ss << std::setprecision(numPrecision) << v;
77 auto dec = str.find(
'.');
78 if(
dec == word::npos)
return str;
80 auto len = str.size();
81 if(len == word::npos)
return str;
83 auto firstZero = word::npos;
84 for(
auto n=len-1;
n>
dec;
n--)
96 if(firstZero ==
dec+1) firstZero =
dec;
98 return str.substr(0,firstZero);
110 transform(inStr.begin(), inStr.end(), oStr.begin(), ::toupper);
118 if( s ==
"YES" || s ==
"OK" || s ==
"TRUE" || s ==
"ON" || s==
"T")
return true;
126 if( s ==
"NO" || s ==
"N" ||
"FALSE" || s ==
"OFF" || s ==
"F")
return true;
133 return w1+
"<"+w2+
">";
143 return base+
"<"+w1+
","+w2+
">";
148 return base+
"<"+w1+
","+w2+
","+w3+
">";
153 return bw + sep + tw;
158 if(
auto pos = w.find_last_of(sep); pos != word::npos)
160 return w.substr(0,pos);
170 if(
auto pos = w.find_last_of(sep); pos != word::npos)
172 return w.substr(pos+1);
229 val = std::stoull(w);
302 val =
static_cast<int16>(std::stoi(w));
320 val =
static_cast<int8>(std::stoi(w));
341 catch (std:: out_of_range& e)
343 val =
static_cast<real>( std::stold(w) );
355 val = std::strtod(buf, &c);
358 val =
static_cast<real>( std::strtold(buf, &c) );
359 if(val == HUGE_VAL || c==buf)
374 if(
bool t =
isYes(w); t )
379 if(
bool f =
isNo(w); f )
word tailName(const word &w, char sep='.')
word angleBracketsNames3(const word &base, const word &w1, const word &w2, const word &w3)
const real verySmallValue
auto count(const Vector< T, Allocator > &vec, const T &val)
IOstream & fixed(IOstream &io)
IOstream & dec(IOstream &io)
word real2Fixed(const real &v, int32 numPrecision=6)
bool readInt32(const word &w, int32 &val)
word real2FixedStripZeros(const real &v, int32 numPrecision=6)
bool validWordWithQuote(char c)
bool readUint32(const word &w, uint32 &val)
bool readBoolian_Str(const word &w, bool &val)
bool readReal(const word &w, real &val)
word toUpper(const word &inStr)
bool readLabel(const word &w, label &val)
bool readInt64(const word &w, int64 &val)
bool readInt16(const word &w, int16 &val)
word baseName(const word &w, char sep='.')
word angleBracketsNames2(const word &base, const word &w1, const word &w2)
INLINE_FUNCTION_HD T length(const triple< T > &v1)
word angleBracketsNames(const word &w1, const word &w2)
INLINE_FUNCTION_HD real abs(real x)
bool isNo(const word &str)
word removeDecimalZeros(const word &str)
bool readInt8(const word &w, int8 &val)
word real2Word(const real &v, int32 numPrecision=6)
word groupNames(const word &bw, const word &tw, char sep='.')
word int322Word(const int32 &v)
bool isYes(const word &str)
int32 countChar(const word &s, const char c)