Common functions to work with dollar amounts. More...
#include "string"
Namespaces | |
Lox | |
Common methods and functionality easily shared between projects. | |
Lox::Prices | |
Common functions to work with dollar amounts. | |
Functions | |
std::string | Lox::Prices::format (const double &price) |
Format a numeric price into a standard price string. More... | |
bool | Lox::Prices::nearlyTheSame (const double a, const double b) |
Determine if the two values are nearly the same. More... | |
bool | Lox::Prices::parse (const std::string &str, double &price) |
Parse a text string and get back price information. More... | |
bool | Lox::Prices::parse (const std::string &str, double &dollars, double ¢s) |
Parse a text string and get back price information. More... | |
std::string | Lox::Prices::reformatStr (const std::string &str) |
If the input string is a valid price, reformat the string. Make no change if the string is not a valid price. More... | |
bool | Lox::Prices::validate (const std::string &str) |
Determine if the text is a valid dollar string. More... | |
Common functions to work with dollar amounts.