Templates -- Meow  1.1.4
A C++ template which is unable and also not allowed to compile to obj-file first.
utility.hpp File Reference
#include <string>
#include <stack>
#include <cstdio>
#include <cstdarg>
#include <algorithm>
#include <cstdint>
#include <cctype>
#include <cstring>
#include <cmath>

Go to the source code of this file.

Namespaces

 meow
 

Functions

std::string meow::stringPrintf (char const *fmt,...)
 類似C的printf, 不過是將格式化的字串丟到 std::string 裡回傳 More...
 
std::string meow::stringReplace (std::string str, std::string const &from, std::string const &to)
 將輸入字串中的某個pattern取代成另一個pattern More...
 
bool meow::cstringEndWith (char const *str, int n,...)
 檢查給定字串的結尾是否符合給定的數個patterns中的一個 More...
 
void meow::debugPrintf_ (char const *file, char const *func, int32_t line, char const *msg)
 
void meow::messagePrintf (int32_t level_change, char const *fmt,...)
 
double meow::noEPS (double value, double eps)
 
double meow::normalize (double lower, double upper, double value)
 
double meow::denormalize (double lower, double upper, double ratio)
 
double meow::ratioMapping (double l1, double u1, double m1, double l2, double u2)
 
bool meow::filenameCompare (std::string const &f1, std::string const &f2)
 將兩個字串用人類習慣的檔名排序方式排序 More...
 
template<class T >
meow::inRange (T const &mn, T const &mx, T const &v)
 std::min(mx,std::max(mn,v)) More...
 
template<class T >
double meow::average (T const &beg, T const &end, double sigs)
 只將 sigs 個標準差以內的數據拿來取平均 More...
 
template<class T >
double meow::average (T const &beg, T const &end, T const &p, double sigs)
 只將 sigs 個標準差以內的數據拿來取平均, 不過這次用 p 來加權平均 More...