22 #error util.h is only for C++! 31 #define FORCE_SCI 0.0000001 47 enum Direction { LEFT, CENTER, RIGHT };
48 static void shiftStr(
string& str,
string recruit, Direction dir = RIGHT);
49 static string toLower(
const string& str);
50 static string doubleToStr(
double val,
int format,
int digits,
int shiftNum,
double forceSci = FORCE_SCI);
51 static string doubleToSxgStr(
double val);
52 static string stripTrailingOs(
const string& numStr);
53 static string shiftPoint(
double num,
int digits,
int shiftNum);
54 static string shiftPointEng(
const string& numStr, Direction dir,
int digits);
55 static void getMantExp(
const string& numStr,
double& m,
int& e);
56 static bool getMantExp(
const string& numStr,
string& mnt,
string& exp);
57 static int getEngShiftNum(
int e,
int eng);
58 static string roundMantisse(
string& numStr,
int digits,
double forceSci = FORCE_SCI);
59 static string formatFixNum(
double num,
int digits);
60 static string formatFixNumStr(
string numStr,
int digits);
61 static string roundNumStr(
string& numStr,
int digits,
bool isSci,
double forceSci = FORCE_SCI);
62 static string roundSxgNumStr(
string& numStr,
int maxLen);
63 static string formatSeven(
string& numStr,
int len,
int expLen,
char fillChar);
64 static string formatFixNumStr(
string& numStr,
int digits,
int digitsAfterPoint,
bool isOstripped =
true);
65 static string trimNumStr(
string numStr,
int maxLen);
66 static string trimStr(
string str,
int len = 15, Direction dir = LEFT,
char fillChar =
' ');
67 static string trimStr(
int num ,
int len = 15, Direction dir = LEFT,
char fillChar =
' ');
68 static string replace(
const string& srcStr,
const string& oldStr,
const string& newStr);
69 static string stripLines(
string str);
70 static void eraseCrs(
string& str);
71 static void stripLine(
string& line);
72 static string getNextSym(
string& expr);
73 static double fact(
double n);
74 static double root(
double x,
double y);
Allgemeine Funktionen, die nicht einer speziellen Klasse zugerechnet werden koennen.
Definition: util.h:44