GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions | Variables
Core.h File Reference
#include <string>
#include <vector>
#include <Wt/Json/Object.h>
#include <Wt/WTemplate.h>
#include "Numeric.h"
+ Include dependency graph for Core.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GCW::Core::CharConv
 

Namespaces

namespace  GCW
 
namespace  GCW::Core
 helper functions and features
 

Typedefs

typedef struct GCW::Core::CharConv GCW::Core::CharConv_t
 

Functions

std::vector< std::string > GCW::Core::split (const std::string &value, char delim)
 
std::string & GCW::Core::rtrim (std::string &s, const char *t=trim_ws)
 
std::string & GCW::Core::ltrim (std::string &s, const char *t=trim_ws)
 
std::string & GCW::Core::trim (std::string &s, const char *t=trim_ws)
 
std::string GCW::Core::toupper (const std::string &s)
 
std::string GCW::Core::tolower (const std::string &s)
 
Wt::Json::Object GCW::Core::toJson (Wt::WTreeView *_view)
 
std::string GCW::Core::hexDump (const std::string &data, int start=-1, int end=-1)
 
auto GCW::Core::newGuid () -> std::string
 Generate new GUID string value.
 
auto GCW::Core::currentDateTime () -> Wt::WDateTime
 Current Date/Time.
 
auto GCW::Core::dateStorageString (const Wt::WDate *_date) -> std::string
 
auto GCW::Core::dateTimeStorageString (const Wt::WDateTime &_dateTime) -> std::string
 
auto GCW::Core::dateTimeDisplayString (const Wt::WDateTime &_dateTime) -> std::string
 
auto GCW::Core::currentDateTimeStorageString () -> std::string
 
auto GCW::Core::currentDateTimeDisplayString () -> std::string
 
std::string GCW::Core::makeFileName (const std::string &value)
 Make File Name.
 
bool GCW::Core::fileExists (const std::string &fileName)
 Check if a File or Folder exists.
 
int GCW::Core::system_command (const std::string &cmd, bool show=false)
 Execute a system command.
 
std::vector< std::string > GCW::Core::fileList (const std::string &folder)
 File Listing.
 
std::vector< std::string > GCW::Core::findFiles (const std::string &folder, const std::string &match)
 Find File.
 
int GCW::Core::stoi (const std::string &value)
 Convert a String to an Integer.
 
std::string GCW::Core::itos (int value)
 Convert an Integer to a String.
 
double GCW::Core::stof (const std::string &value)
 Convert a String to Float.
 
std::string GCW::Core::ftos (double value, int decimals=2)
 Convert a Float to String with decimal precision.
 
std::string GCW::Core::ftos (double value, const std::string &suffix, int decimals=2)
 
std::string GCW::Core::ftos (const std::string &prefix, double value, int decimals=2)
 
std::string GCW::Core::ftom (double value, int decimals=2)
 
std::string GCW::Core::ftom (const std::string &prefix, double value, int decimals=2)
 
bool GCW::Core::ends_with (const std::string &value, const std::string &ending)
 Check if a string ends with another string.
 
std::string GCW::Core::append (const std::string &s, const std::string &append, const std::string &separator)
 Append a string to string.
 
std::string GCW::Core::prepend (const std::string &s, int length=0, char pad='0')
 Prepend some number of characters in front of another string.
 
std::string GCW::Core::ucase (const std::string &value)
 Upper Case a string.
 
std::string GCW::Core::lcase (const std::string &value)
 Lower Case a string.
 
int GCW::Core::roundUp (float value)
 Round a number up.
 
int GCW::Core::roundDown (float value)
 Round a number down.
 
float GCW::Core::roundCurrency (float value)
 Round a number for Currency.
 
std::string GCW::Core::replace (const std::string &string, const std::string &before, const std::string &after)
 Replace a String.
 
std::vector< std::string > GCW::Core::readCSVRow (const std::string &row)
 
bool GCW::Core::feq (double a, double b, double epsilon=0.005f, bool trace=false)
 
std::string GCW::Core::to_string (Wt::WTemplate &templt)
 
std::string GCW::Core::to_string (Wt::WTemplate *templt)
 
bool GCW::Core::to_htmlfile (Wt::WTemplate &templt, const std::string &folderName, const std::string &fileName)
 
bool GCW::Core::to_htmlfile (Wt::WTemplate *templt, const std::string &folderName, const std::string &fileName)
 

Variables

const char * GCW::Core::trim_ws = " \t\n\r\f\v"
 
const CharConv_t GCW::Core::g_iso8859Conv [256]