2023-01-21 18:27:03 -06:00
|
|
|
//
|
|
|
|
// Created by quentin on 1/21/23.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef BUDGET_UTILITIES_H
|
|
|
|
#define BUDGET_UTILITIES_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class Utilities {
|
|
|
|
public:
|
2023-01-22 17:21:31 -06:00
|
|
|
/**
|
|
|
|
* @brief Asks the user to confirm an action with a yes or no question
|
|
|
|
*
|
|
|
|
* @param question The question to ask the user
|
|
|
|
*
|
|
|
|
* @return True if the user confirms the action, false otherwise
|
|
|
|
*/
|
2023-01-21 18:27:03 -06:00
|
|
|
static bool confirm(const std::string &question);
|
2023-02-05 21:30:54 -06:00
|
|
|
|
|
|
|
static long long int extractDollars(const std::string& string);
|
|
|
|
|
|
|
|
static long long int extractCents(const std::string& string);
|
|
|
|
|
|
|
|
static bool hasNumber(const std::string &string);
|
2023-01-21 18:27:03 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif //BUDGET_UTILITIES_H
|