1#line 2 "src/Glb/Core.cpp"
15#include <Wt/WModelIndex.h>
17#include <Wt/WDateTime.h>
18#include <Wt/WLocalDateTime.h>
20#include "../3rd/guid.hpp"
25std::vector<std::string> &
26split(
const std::string & s,
char delim, std::vector<std::string> & elems )
28 std::stringstream ss( s );
30 while( std::getline( ss, item, delim ) )
32 elems.push_back( item );
38std::vector<std::string>
40split(
const std::string & s,
char delim )
42 std::vector<std::string> elems;
52rtrim( std::string & s,
const char* t )
54 s.erase( s.find_last_not_of(t) + 1 );
61ltrim( std::string & s,
const char* t )
63 s.erase( 0, s.find_first_not_of(t) );
70trim( std::string & s,
const char* t )
79 std::string retVal = s;
81 std::transform( retVal.begin(), retVal.end(), retVal.begin(), ::toupper );
90 std::string retVal = s;
92 std::transform( retVal.begin(), retVal.end(), retVal.begin(), ::tolower );
112 if( !view()-> isExpanded( _parent ) )
120 bool expanded =
false;
121 for(
int row=0; row< view()-> model()-> rowCount( _parent ); row++ )
122 expanded |=
iterate( _jary, view()-> model()-> index( row, 0, _parent ) );
139 if( accountGuid !=
"" )
140 _jary.push_back( accountGuid );
163 jobj[
"selected"] =
Wt::WString( selectedAccount() );
165 for(
int col=0; col< 7; col++ )
170 jobj[
"expanded"] = jary;
180hexDump(
const std::string &
string,
int start,
int end )-> std::string
182 std::stringstream rv;
185 for(
unsigned int i=0; i<
string.length(); i += 16 )
191 snprintf( buffer,
sizeof(buffer),
"%04x: ", i );
192 adrLine = std::string(buffer);
194 for(
int j=0; j<16; j++ )
196 if( i+j <
string.length() )
198 snprintf( buffer,
sizeof(buffer),
"%02x ", (
string.at(i+j) & 0xff) );
199 hexLine += std::string(buffer);
201 if( std::isprint(
string.at(i+j) ) )
203 snprintf( buffer,
sizeof(buffer),
"%c",
string.at(i+j) );
204 ascLine += std::string(buffer);
219 bool showline =
false;
220 if( start == -1 && end == -1 )
224 if( (start > -1 && i >= start)
225 && (end > -1 && i <= end)
247 std::string g = xg::newGuid();
252 retVal.push_back( c );
350 for(
auto ch : value )
389 case '<': retVal +=
'(';
break;
390 case '>': retVal +=
')';
break;
391 case ':': retVal +=
'-';
break;
392 case '"': retVal +=
'\'';
break;
393 case '/': retVal +=
'-';
break;
394 case '\\': retVal +=
'-';
break;
398 default: retVal += ch;
415 int result = system( cmd.c_str() );
418 std::cout << __FILE__ <<
":" << __LINE__ <<
" " << cmd << std::endl;
424 std::cout << __FILE__ <<
":" << __LINE__ <<
" "
449ialphasort(
const struct dirent **a,
const struct dirent **b )->
int
451 std::string ua = (*a)-> d_name;
452 std::transform( ua.begin(), ua.end(), ua.begin(), ::toupper );
454 std::string ub = (*b)-> d_name;
455 std::transform( ub.begin(), ub.end(), ub.begin(), ::toupper );
457 return strverscmp( ua.c_str(), ub.c_str() );
464fileList(
const std::string & folder )-> std::vector<std::string>
466 std::vector<std::string> retVal;
472 struct dirent ** namelist;
473 int n = scandir( folder.c_str(), &namelist, 0,
ialphasort );
481 for(
int i=0; i< n; i++ )
488 std::string fileName( namelist[i]-> d_name );
494 if( fileName ==
"." )
501 std::string filePath( folder +
"/" + fileName );
519 struct stat fileStat;
520 int result = stat( filePath.c_str(), &fileStat );
528 retVal.push_back( fileName );
544findFiles(
const std::string & folder,
const std::string & match )-> std::vector<std::string>
546 std::vector<std::string> retVal;
548 for(
auto fileName :
fileList( folder ) )
549 if( fileName.find(match) != std::string::npos )
550 retVal.push_back( fileName );
559fileExists(
const std::string & fileName )->
bool
561 std::ifstream f( fileName.c_str() );
569stoi(
const std::string & value )->
int
573 int id = std::stoi(value);
588itos(
int value )-> std::string
601stof(
const std::string & value )->
double
606 for(
auto c : value )
607 if( isdigit(c) || c ==
'.' || c ==
'-' )
612 double id = std::stod(v);
628ftos(
double value,
int decimals )-> std::string
632 snprintf( buffer,
sizeof(buffer),
"%.*f", decimals, value );
634 return std::string(buffer);
641ftos(
double value,
const std::string & suffix,
int decimals )-> std::string
645 snprintf( buffer,
sizeof(buffer),
"%.*f%s", decimals, value, suffix.data() );
647 return std::string(buffer);
654ftos(
const std::string & prefix,
double value,
int decimals )-> std::string
658 snprintf( buffer,
sizeof(buffer),
"%s%.*f", prefix.data(), decimals, value );
660 return std::string(buffer);
667ftom(
double value,
int decimals )-> std::string
671 std::setlocale( LC_ALL,
"" );
672 snprintf( buffer,
sizeof(buffer),
"%'.*f", decimals, value );
674 return std::string(buffer);
680ftom(
const std::string & prefix,
double value,
int decimals )-> std::string
684 std::setlocale( LC_ALL,
"" );
685 snprintf( buffer,
sizeof(buffer),
"%s%'.*f", prefix.data(), decimals, value );
687 return std::string(buffer);
694ends_with(
const std::string & value,
const std::string & ending )->
bool
696 if( ending.size() > value.size() )
699 return std::equal( ending.rbegin(), ending.rend(), value.rbegin() );
706append(
const std::string & s,
const std::string & append,
const std::string & separator )-> std::string
708 std::string retVal = s;
736prepend(
const std::string & s,
int length,
char pad )-> std::string
738 std::string retVal = s;
740 while( retVal.length() < length )
741 retVal = pad + retVal;
750ucase(
const std::string & value )-> std::string
752 std::string retVal = value;
753 std::transform( retVal.begin(), retVal.end(), retVal.begin(), ::toupper );
761lcase(
const std::string & value )-> std::string
763 std::string retVal = value;
764 std::transform( retVal.begin(), retVal.end(), retVal.begin(), ::tolower );
796 float retVal = value * 100;
798 retVal = round(retVal);
809replace(
const std::string &
string,
const std::string & before,
const std::string & after )-> std::string
811 std::string retVal = string;
813 size_t start_pos = 0;
814 while( (start_pos = retVal.find( before, start_pos )) != std::string::npos )
816 retVal.replace( start_pos, before.length(), after );
817 start_pos += after.length();
835readCSVRow(
const std::string & row )-> std::vector<std::string>
838 std::vector<std::string> fields {
""};
850 fields.push_back(
"");
863 fields[i].push_back(c);
885 fields[i].push_back(c);
901 fields.push_back(
"");
909 fields[i].push_back(
'"');
937feq(
double a,
double b,
double epsilon,
bool trace )->
bool
939 bool retVal = fabs( a - b ) < epsilon;
942 std::cout << __FILE__ <<
":" << __LINE__
943 <<
" retv:" << std::fixed << retVal
944 <<
" eps:" << std::fixed << epsilon
945 <<
" fabs:" << std::fixed << fabs( a - b )
946 <<
" a:" << std::fixed << a
947 <<
" b:" << std::fixed << b
965 std::stringstream ss;
966 templt.htmlText( ss );
998 std::ofstream ofs( folderName + fileName, std::ofstream::out );
1018 {
"NUL",
nullptr,
nullptr,
nullptr,
"Null char" },
1019 {
"SOH",
nullptr,
nullptr,
nullptr,
"Start of Heading" },
1020 {
"STX",
nullptr,
nullptr,
nullptr,
"Start of Text" },
1021 {
"ETX",
nullptr,
nullptr,
nullptr,
"End of Text" },
1022 {
"EOT",
nullptr,
nullptr,
nullptr,
"End of Transmission" },
1023 {
"ENQ",
nullptr,
nullptr,
nullptr,
"Enquiry" },
1024 {
"ACK",
nullptr,
nullptr,
nullptr,
"Acknowledgment" },
1025 {
"BEL",
nullptr,
nullptr,
nullptr,
"Bell" },
1026 {
"BS",
nullptr,
nullptr,
nullptr,
"Back Space" },
1027 {
"HT",
nullptr,
nullptr,
nullptr,
"Horizontal Tab" },
1028 {
"LF",
"<br />",
nullptr,
nullptr,
"Line Feed" },
1029 {
"VT",
nullptr,
nullptr,
nullptr,
"Vertical Tab" },
1030 {
"FF",
nullptr,
nullptr,
nullptr,
"Form Feed" },
1031 {
"CR",
nullptr,
nullptr,
nullptr,
"Carriage Return" },
1032 {
"SO",
nullptr,
nullptr,
nullptr,
"Shift Out / X-On" },
1033 {
"SI",
nullptr,
nullptr,
nullptr,
"Shift In / X-Off" },
1034 {
"DLE",
nullptr,
nullptr,
nullptr,
"Data Line Escape" },
1035 {
"DC1",
nullptr,
nullptr,
nullptr,
"Device Control 1 (oft. XON)" },
1036 {
"DC2",
nullptr,
nullptr,
nullptr,
"Device Control 2" },
1037 {
"DC3",
nullptr,
nullptr,
nullptr,
"Device Control 3 (oft. XOFF)" },
1038 {
"DC4",
nullptr,
nullptr,
nullptr,
"Device Control 4" },
1039 {
"NAK",
nullptr,
nullptr,
nullptr,
"Negative Acknowledgement" },
1040 {
"SYN",
nullptr,
nullptr,
nullptr,
"Synchronous Idle" },
1041 {
"ETB",
nullptr,
nullptr,
nullptr,
"End of Transmit Block" },
1042 {
"CAN",
nullptr,
nullptr,
nullptr,
"Cancel" },
1043 {
"EM",
nullptr,
nullptr,
nullptr,
"End of Medium" },
1044 {
"SUB",
nullptr,
nullptr,
nullptr,
"Substitute" },
1045 {
"ESC",
nullptr,
nullptr,
nullptr,
"Escape" },
1046 {
"FS",
nullptr,
nullptr,
nullptr,
"File Separator" },
1047 {
"GS",
nullptr,
nullptr,
nullptr,
"Group Separator" },
1048 {
"RS",
nullptr,
nullptr,
nullptr,
"Record Separator" },
1049 {
"US",
nullptr,
nullptr,
nullptr,
"Unit Separator" },
1050 {
" ",
nullptr,
nullptr,
nullptr,
"Space" },
1051 {
"!",
nullptr,
nullptr,
nullptr,
"Exclamation mark" },
1052 {
"\"",
""",
nullptr,
nullptr,
"Double quotes (or speech marks)" },
1053 {
"#",
nullptr,
nullptr,
nullptr,
"Number" },
1054 {
"$",
nullptr,
nullptr,
nullptr,
"Dollar" },
1055 {
"%",
nullptr,
nullptr,
nullptr,
"Procenttecken" },
1056 {
"&",
"&",
nullptr,
nullptr,
"Ampersand" },
1057 {
"'",
nullptr,
nullptr,
nullptr,
"Single quote" },
1058 {
"(",
nullptr,
nullptr,
nullptr,
"Open parenthesis (or open bracket)" },
1059 {
")",
nullptr,
nullptr,
nullptr,
"Close parenthesis (or close bracket)" },
1060 {
"*",
nullptr,
nullptr,
nullptr,
"Asterisk" },
1061 {
"+",
nullptr,
nullptr,
nullptr,
"Plus" },
1062 {
",",
nullptr,
nullptr,
nullptr,
"Comma" },
1063 {
"-",
nullptr,
nullptr,
nullptr,
"Hyphen" },
1064 {
".",
nullptr,
nullptr,
nullptr,
"Period, dot or full stop" },
1065 {
"/",
nullptr,
nullptr,
nullptr,
"Slash or divide" },
1066 {
"0",
nullptr,
nullptr,
nullptr,
"Zero" },
1067 {
"1",
nullptr,
nullptr,
nullptr,
"One" },
1068 {
"2",
nullptr,
nullptr,
nullptr,
"Two" },
1069 {
"3",
nullptr,
nullptr,
nullptr,
"Three" },
1070 {
"4",
nullptr,
nullptr,
nullptr,
"Four" },
1071 {
"5",
nullptr,
nullptr,
nullptr,
"Five" },
1072 {
"6",
nullptr,
nullptr,
nullptr,
"Six" },
1073 {
"7",
nullptr,
nullptr,
nullptr,
"Seven" },
1074 {
"8",
nullptr,
nullptr,
nullptr,
"Eight" },
1075 {
"9",
nullptr,
nullptr,
nullptr,
"Nine" },
1076 {
":",
nullptr,
nullptr,
nullptr,
"Colon" },
1077 {
";",
nullptr,
nullptr,
nullptr,
"Semicolon" },
1078 {
"<",
"<",
nullptr,
nullptr,
"Less than (or open angled bracket)" },
1079 {
"=",
nullptr,
nullptr,
nullptr,
"Equals" },
1080 {
">",
">",
nullptr,
nullptr,
"Greater than (or close angled bracket)" },
1081 {
"?",
nullptr,
nullptr,
nullptr,
"Question mark" },
1082 {
"@",
nullptr,
nullptr,
nullptr,
"At symbol" },
1083 {
"A",
nullptr,
nullptr,
nullptr,
"Uppercase A" },
1084 {
"B",
nullptr,
nullptr,
nullptr,
"Uppercase B" },
1085 {
"C",
nullptr,
nullptr,
nullptr,
"Uppercase C" },
1086 {
"D",
nullptr,
nullptr,
nullptr,
"Uppercase D" },
1087 {
"E",
nullptr,
nullptr,
nullptr,
"Uppercase E" },
1088 {
"F",
nullptr,
nullptr,
nullptr,
"Uppercase F" },
1089 {
"G",
nullptr,
nullptr,
nullptr,
"Uppercase G" },
1090 {
"H",
nullptr,
nullptr,
nullptr,
"Uppercase H" },
1091 {
"I",
nullptr,
nullptr,
nullptr,
"Uppercase I" },
1092 {
"J",
nullptr,
nullptr,
nullptr,
"Uppercase J" },
1093 {
"K",
nullptr,
nullptr,
nullptr,
"Uppercase K" },
1094 {
"L",
nullptr,
nullptr,
nullptr,
"Uppercase L" },
1095 {
"M",
nullptr,
nullptr,
nullptr,
"Uppercase M" },
1096 {
"N",
nullptr,
nullptr,
nullptr,
"Uppercase N" },
1097 {
"O",
nullptr,
nullptr,
nullptr,
"Uppercase O" },
1098 {
"P",
nullptr,
nullptr,
nullptr,
"Uppercase P" },
1099 {
"Q",
nullptr,
nullptr,
nullptr,
"Uppercase Q" },
1100 {
"R",
nullptr,
nullptr,
nullptr,
"Uppercase R" },
1101 {
"S",
nullptr,
nullptr,
nullptr,
"Uppercase S" },
1102 {
"T",
nullptr,
nullptr,
nullptr,
"Uppercase T" },
1103 {
"U",
nullptr,
nullptr,
nullptr,
"Uppercase U" },
1104 {
"V",
nullptr,
nullptr,
nullptr,
"Uppercase V" },
1105 {
"W",
nullptr,
nullptr,
nullptr,
"Uppercase W" },
1106 {
"X",
nullptr,
nullptr,
nullptr,
"Uppercase X" },
1107 {
"Y",
nullptr,
nullptr,
nullptr,
"Uppercase Y" },
1108 {
"Z",
nullptr,
nullptr,
nullptr,
"Uppercase Z" },
1109 {
"[",
nullptr,
nullptr,
nullptr,
"Opening bracket" },
1110 {
"\\",
nullptr,
nullptr,
nullptr,
"Backslash" },
1111 {
"]",
nullptr,
nullptr,
nullptr,
"Closing bracket" },
1112 {
"^",
nullptr,
nullptr,
nullptr,
"Caret - circumflex" },
1113 {
"_",
nullptr,
nullptr,
nullptr,
"Underscore" },
1114 {
"`",
nullptr,
nullptr,
nullptr,
"Grave accent" },
1115 {
"a",
nullptr,
nullptr,
nullptr,
"Lowercase a" },
1116 {
"b",
nullptr,
nullptr,
nullptr,
"Lowercase b" },
1117 {
"c",
nullptr,
nullptr,
nullptr,
"Lowercase c" },
1118 {
"d",
nullptr,
nullptr,
nullptr,
"Lowercase d" },
1119 {
"e",
nullptr,
nullptr,
nullptr,
"Lowercase e" },
1120 {
"f",
nullptr,
nullptr,
nullptr,
"Lowercase f" },
1121 {
"g",
nullptr,
nullptr,
nullptr,
"Lowercase g" },
1122 {
"h",
nullptr,
nullptr,
nullptr,
"Lowercase h" },
1123 {
"i",
nullptr,
nullptr,
nullptr,
"Lowercase i" },
1124 {
"j",
nullptr,
nullptr,
nullptr,
"Lowercase j" },
1125 {
"k",
nullptr,
nullptr,
nullptr,
"Lowercase k" },
1126 {
"l",
nullptr,
nullptr,
nullptr,
"Lowercase l" },
1127 {
"m",
nullptr,
nullptr,
nullptr,
"Lowercase m" },
1128 {
"n",
nullptr,
nullptr,
nullptr,
"Lowercase n" },
1129 {
"o",
nullptr,
nullptr,
nullptr,
"Lowercase o" },
1130 {
"p",
nullptr,
nullptr,
nullptr,
"Lowercase p" },
1131 {
"q",
nullptr,
nullptr,
nullptr,
"Lowercase q" },
1132 {
"r",
nullptr,
nullptr,
nullptr,
"Lowercase r" },
1133 {
"s",
nullptr,
nullptr,
nullptr,
"Lowercase s" },
1134 {
"t",
nullptr,
nullptr,
nullptr,
"Lowercase t" },
1135 {
"u",
nullptr,
nullptr,
nullptr,
"Lowercase u" },
1136 {
"v",
nullptr,
nullptr,
nullptr,
"Lowercase v" },
1137 {
"w",
nullptr,
nullptr,
nullptr,
"Lowercase w" },
1138 {
"x",
nullptr,
nullptr,
nullptr,
"Lowercase x" },
1139 {
"y",
nullptr,
nullptr,
nullptr,
"Lowercase y" },
1140 {
"z",
nullptr,
nullptr,
nullptr,
"Lowercase z" },
1141 {
"{",
nullptr,
nullptr,
nullptr,
"Opening brace" },
1142 {
"|",
nullptr,
nullptr,
nullptr,
"Vertical bar" },
1143 {
"}",
nullptr,
nullptr,
nullptr,
"Closing brace" },
1144 {
"~",
nullptr,
nullptr,
nullptr,
"Equivalency sign - tilde" },
1145 {
"DEL",
nullptr,
nullptr,
nullptr,
"Delete" },
1149 {
"€",
"€",
nullptr,
nullptr,
"Euro sign" },
1150 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr },
1151 {
"‚",
"‚",
nullptr,
nullptr,
"Single low-9 quotation mark" },
1152 {
"ƒ",
"ƒ",
nullptr,
nullptr,
"Latin small letter f with hook" },
1153 {
"„",
"„",
nullptr,
nullptr,
"Double low-9 quotation mark" },
1154 {
"…",
"…",
nullptr,
nullptr,
"Horizontal ellipsis" },
1155 {
"†",
"†",
nullptr,
nullptr,
"Dagger" },
1156 {
"‡",
"‡",
nullptr,
nullptr,
"Double dagger" },
1157 {
"ˆ",
"ˆ",
nullptr,
nullptr,
"Modifier letter circumflex accent" },
1158 {
"‰",
"‰",
nullptr,
nullptr,
"Per mille sign" },
1159 {
"Š",
"Š",
nullptr,
nullptr,
"Latin capital letter S with caron" },
1160 {
"‹",
"‹",
nullptr,
nullptr,
"Single left-pointing angle quotation" },
1161 {
"Œ",
"Œ",
nullptr,
nullptr,
"Latin capital ligature OE" },
1162 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr },
1163 {
"Ž",
nullptr,
nullptr,
nullptr,
"Latin captial letter Z with caron" },
1164 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr },
1165 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr },
1166 {
"‘",
"‘",
nullptr,
"'",
"Left single quotation mark" },
1167 {
"’",
"’",
nullptr,
"'",
"Right single quotation mark" },
1168 {
"“",
"“",
"\xe2\x80\x9c",
"\"",
"Left double quotation mark" },
1169 {
"”",
"”",
"\xe2\x80\x9d",
"\"",
"Right double quotation mark" },
1170 {
"•",
"•",
nullptr,
nullptr,
"Bullet" },
1171 {
"–",
"–",
nullptr,
"-",
"En dash" },
1172 {
"—",
"—",
nullptr,
"-",
"Em dash" },
1173 {
"˜",
"˜",
nullptr,
"~",
"Small tilde" },
1174 {
"™",
"™",
nullptr,
"tm",
"Trade mark sign" },
1175 {
"š",
"š",
nullptr,
nullptr,
"Latin small letter S with caron" },
1176 {
"›",
"›",
nullptr,
nullptr,
"Single right-pointing angle quotation mark" },
1177 {
"œ",
"œ",
nullptr,
nullptr,
"Latin small ligature oe" },
1178 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr },
1179 {
"ž",
nullptr,
nullptr,
nullptr,
"Latin small letter z with caron" },
1180 {
"Ÿ",
"ÿ",
nullptr,
nullptr,
"Latin capital letter Y with diaeresis" },
1181 {
" ",
" ",
nullptr,
nullptr,
"Non-breaking space" },
1182 {
"¡",
"¡",
nullptr,
nullptr,
"Inverted exclamation mark" },
1183 {
"¢",
"¢",
nullptr,
nullptr,
"Cent sign" },
1184 {
"£",
"£",
nullptr,
"#",
"Pound sign" },
1185 {
"¤",
"¤",
nullptr,
nullptr,
"Currency sign" },
1186 {
"¥",
"¥",
nullptr,
nullptr,
"Yen sign" },
1187 {
"¦",
"¦",
nullptr,
nullptr,
"Pipe, Broken vertical bar" },
1188 {
"§",
"§",
nullptr,
nullptr,
"Section sign" },
1189 {
"¨",
"¨",
nullptr,
nullptr,
"Spacing diaeresis - umlaut" },
1190 {
"©",
"©",
nullptr,
nullptr,
"Copyright sign" },
1191 {
"ª",
"ª",
nullptr,
nullptr,
"Feminine ordinal indicator" },
1192 {
"«",
"«",
nullptr,
nullptr,
"Left double angle quotes" },
1193 {
"¬",
"¬",
nullptr,
nullptr,
"Not sign" },
1194 {
"",
"­",
nullptr,
nullptr,
"Soft hyphen" },
1195 {
"®",
"®",
nullptr,
nullptr,
"Registered trade mark sign" },
1196 {
"¯",
"¯",
nullptr,
nullptr,
"Spacing macron - overline" },
1197 {
"°",
"°",
nullptr,
nullptr,
"Degree sign" },
1198 {
"±",
"±",
nullptr,
nullptr,
"Plus-or-minus sign" },
1199 {
"²",
"²",
nullptr,
nullptr,
"Superscript two - squared" },
1200 {
"³",
"³",
nullptr,
nullptr,
"Superscript three - cubed" },
1201 {
"´",
"´",
nullptr,
nullptr,
"Acute accent - spacing acute" },
1202 {
"µ",
"µ",
nullptr,
nullptr,
"Micro sign" },
1203 {
"¶",
"¶",
nullptr,
nullptr,
"Pilcrow sign - paragraph sign" },
1204 {
"·",
"·",
nullptr,
nullptr,
"Middle dot - Georgian comma" },
1205 {
"¸",
"¸",
nullptr,
nullptr,
"Spacing cedilla" },
1206 {
"¹",
"¹",
nullptr,
nullptr,
"Superscript one" },
1207 {
"º",
"º",
nullptr,
nullptr,
"Masculine ordinal indicator" },
1208 {
"»",
"»",
nullptr,
nullptr,
"Right double angle quotes" },
1209 {
"¼",
"¼",
nullptr,
nullptr,
"Fraction one quarter" },
1210 {
"½",
"½",
nullptr,
nullptr,
"Fraction one half" },
1211 {
"¾",
"¾",
nullptr,
nullptr,
"Fraction three quarters" },
1212 {
"¿",
"¿",
nullptr,
nullptr,
"Inverted question mark" },
1213 {
"À",
"À",
nullptr,
nullptr,
"Latin capital letter A with grave" },
1214 {
"Á",
"Á",
nullptr,
nullptr,
"Latin capital letter A with acute" },
1215 {
"Â",
"Â",
nullptr,
nullptr,
"Latin capital letter A with circumflex" },
1216 {
"Ã",
"Ã",
nullptr,
nullptr,
"Latin capital letter A with tilde" },
1217 {
"Ä",
"Ä",
nullptr,
nullptr,
"Latin capital letter A with diaeresis" },
1218 {
"Å",
"Å",
nullptr,
nullptr,
"Latin capital letter A with ring above" },
1219 {
"Æ",
"Æ",
nullptr,
nullptr,
"Latin capital letter AE" },
1220 {
"Ç",
"Ç",
nullptr,
nullptr,
"Latin capital letter C with cedilla" },
1221 {
"È",
"È",
nullptr,
nullptr,
"Latin capital letter E with grave" },
1222 {
"É",
"É",
nullptr,
nullptr,
"Latin capital letter E with acute" },
1223 {
"Ê",
"Ê",
nullptr,
nullptr,
"Latin capital letter E with circumflex" },
1224 {
"Ë",
"Ë",
nullptr,
nullptr,
"Latin capital letter E with diaeresis" },
1225 {
"Ì",
"Ì",
nullptr,
nullptr,
"Latin capital letter I with grave" },
1226 {
"Í",
"Í",
nullptr,
nullptr,
"Latin capital letter I with acute" },
1227 {
"Î",
"Î",
nullptr,
nullptr,
"Latin capital letter I with circumflex" },
1228 {
"Ï",
"Ï",
nullptr,
nullptr,
"Latin capital letter I with diaeresis" },
1229 {
"Ð",
"Ð",
nullptr,
nullptr,
"Latin capital letter ETH" },
1230 {
"Ñ",
"Ñ",
nullptr,
nullptr,
"Latin capital letter N with tilde" },
1231 {
"Ò",
"Ò",
nullptr,
nullptr,
"Latin capital letter O with grave" },
1232 {
"Ó",
"Ó",
nullptr,
nullptr,
"Latin capital letter O with acute" },
1233 {
"Ô",
"Ô",
nullptr,
nullptr,
"Latin capital letter O with circumflex" },
1234 {
"Õ",
"Õ",
nullptr,
nullptr,
"Latin capital letter O with tilde" },
1235 {
"Ö",
"Ö",
nullptr,
nullptr,
"Latin capital letter O with diaeresis" },
1236 {
"×",
"×",
nullptr,
nullptr,
"Multiplication sign" },
1237 {
"Ø",
"Ø",
nullptr,
nullptr,
"Latin capital letter O with slash" },
1238 {
"Ù",
"Ù",
nullptr,
nullptr,
"Latin capital letter U with grave" },
1239 {
"Ú",
"Ú",
nullptr,
nullptr,
"Latin capital letter U with acute" },
1240 {
"Û",
"Û",
nullptr,
nullptr,
"Latin capital letter U with circumflex" },
1241 {
"Ü",
"Ü",
nullptr,
nullptr,
"Latin capital letter U with diaeresis" },
1242 {
"Ý",
"Ý",
nullptr,
nullptr,
"Latin capital letter Y with acute" },
1243 {
"Þ",
"Þ",
nullptr,
nullptr,
"Latin capital letter THORN" },
1244 {
"ß",
"ß",
nullptr,
nullptr,
"Latin small letter sharp s - ess-zed" },
1245 {
"à",
"à",
nullptr,
nullptr,
"Latin small letter a with grave" },
1246 {
"á",
"á",
nullptr,
nullptr,
"Latin small letter a with acute" },
1247 {
"â",
"â",
nullptr,
nullptr,
"Latin small letter a with circumflex" },
1248 {
"ã",
"ã",
nullptr,
nullptr,
"Latin small letter a with tilde" },
1249 {
"ä",
"ä",
nullptr,
nullptr,
"Latin small letter a with diaeresis" },
1250 {
"å",
"å",
nullptr,
nullptr,
"Latin small letter a with ring above" },
1251 {
"æ",
"æ",
nullptr,
nullptr,
"Latin small letter ae" },
1252 {
"ç",
"ç",
nullptr,
nullptr,
"Latin small letter c with cedilla" },
1253 {
"è",
"è",
nullptr,
nullptr,
"Latin small letter e with grave" },
1254 {
"é",
"é",
nullptr,
nullptr,
"Latin small letter e with acute" },
1255 {
"ê",
"ê",
nullptr,
nullptr,
"Latin small letter e with circumflex" },
1256 {
"ë",
"ë",
nullptr,
nullptr,
"Latin small letter e with diaeresis" },
1257 {
"ì",
"ì",
nullptr,
nullptr,
"Latin small letter i with grave" },
1258 {
"í",
"í",
nullptr,
nullptr,
"Latin small letter i with acute" },
1259 {
"î",
"î",
nullptr,
nullptr,
"Latin small letter i with circumflex" },
1260 {
"ï",
"ï",
nullptr,
nullptr,
"Latin small letter i with diaeresis" },
1261 {
"ð",
"ð",
nullptr,
nullptr,
"Latin small letter eth" },
1262 {
"ñ",
"ñ",
nullptr,
nullptr,
"Latin small letter n with tilde" },
1263 {
"ò",
"ò",
nullptr,
nullptr,
"Latin small letter o with grave" },
1264 {
"ó",
"ó",
nullptr,
nullptr,
"Latin small letter o with acute" },
1265 {
"ô",
"ô",
nullptr,
nullptr,
"Latin small letter o with circumflex" },
1266 {
"õ",
"õ",
nullptr,
nullptr,
"Latin small letter o with tilde" },
1267 {
"ö",
"ö",
nullptr,
nullptr,
"Latin small letter o with diaeresis" },
1268 {
"÷",
"÷",
nullptr,
nullptr,
"Division sign" },
1269 {
"ø",
"ø",
nullptr,
nullptr,
"Latin small letter o with slash" },
1270 {
"ù",
"ù",
nullptr,
nullptr,
"Latin small letter u with grave" },
1271 {
"ú",
"ú",
nullptr,
nullptr,
"Latin small letter u with acute" },
1272 {
"û",
"û",
nullptr,
nullptr,
"Latin small letter u with circumflex" },
1273 {
"ü",
"ü",
nullptr,
nullptr,
"Latin small letter u with diaeresis" },
1274 {
"ý",
"ý",
nullptr,
nullptr,
"Latin small letter y with acute" },
1275 {
"þ",
"þ",
nullptr,
nullptr,
"Latin small letter thorn" },
1276 {
"ÿ",
"ÿ",
nullptr,
nullptr,
"Latin small letter y with diaeresis" },
static auto ialphasort(const struct dirent **a, const struct dirent **b) -> int
static bool iterate(Wt::Json::Array &_jary, Wt::WModelIndex _parent)
static std::vector< std::string > & split(const std::string &s, char delim, std::vector< std::string > &elems)
auto dateStorageString(const Wt::WDate *_date) -> std::string
static constexpr const int User
static WDateTime currentDateTime()
cpp17::any data(ItemDataRole role=ItemDataRole::Display) const
std::string toUTF8() const
WString & arg(const std::wstring &value)
#define GCW_DATETIME_FORMAT_STORAGE
#define GCW_DATE_FORMAT_DISPLAY
#define GCW_DATE_FORMAT_STORAGE
WString asString(const cpp17::any &v, const WString &formatString=WString())
int system_command(const std::string &cmd, bool show=false)
Execute a system command.
int roundUp(float value)
Round a number up.
double stof(const std::string &value)
Convert a String to Float.
std::string toupper(const std::string &s)
std::string lcase(const std::string &value)
Lower Case a string.
auto currentDateTime() -> Wt::WDateTime
Current Date/Time.
std::string ucase(const std::string &value)
Upper Case a string.
std::string tolower(const std::string &s)
bool ends_with(const std::string &value, const std::string &ending)
Check if a string ends with another string.
int roundDown(float value)
Round a number down.
std::string ftom(double value, int decimals=2)
auto dateTimeDisplayString(const Wt::WDateTime &_dateTime) -> std::string
bool fileExists(const std::string &fileName)
Check if a File or Folder exists.
std::string append(const std::string &s, const std::string &append, const std::string &separator)
Append a string to string.
std::string ftos(double value, int decimals=2)
Convert a Float to String with decimal precision.
std::vector< std::string > split(const std::string &value, char delim)
bool feq(double a, double b, double epsilon=0.005f, bool trace=false)
float roundCurrency(float value)
Round a number for Currency.
std::string itos(int value)
Convert an Integer to a String.
std::string & trim(std::string &s, const char *t=trim_ws)
std::string & ltrim(std::string &s, const char *t=trim_ws)
std::string replace(const std::string &string, const std::string &before, const std::string &after)
Replace a String.
std::string makeFileName(const std::string &value)
Make File Name.
std::vector< std::string > findFiles(const std::string &folder, const std::string &match)
Find File.
int stoi(const std::string &value)
Convert a String to an Integer.
auto currentDateTimeDisplayString() -> std::string
std::string prepend(const std::string &s, int length=0, char pad='0')
Prepend some number of characters in front of another string.
const CharConv_t g_iso8859Conv[256]
std::string hexDump(const std::string &data, int start=-1, int end=-1)
std::string to_string(Wt::WTemplate &templt)
std::string & rtrim(std::string &s, const char *t=trim_ws)
bool to_htmlfile(Wt::WTemplate &templt, const std::string &folderName, const std::string &fileName)
Wt::Json::Object toJson(Wt::WTreeView *_view)
std::vector< std::string > readCSVRow(const std::string &row)
auto dateTimeStorageString(const Wt::WDateTime &_dateTime) -> std::string
auto newGuid() -> std::string
Generate new GUID string value.
auto currentDateTimeStorageString() -> std::string
std::vector< std::string > fileList(const std::string &folder)
File Listing.