presage
0.8.7
|
#include <utility.h>
Static Public Member Functions | |
static char * | strtolower (char *) |
static std::string & | strtolower (std::string &) |
static std::string | strtolower (const std::string &) |
static std::string | strtoupper (const std::string &) |
static bool | isTrueFalse (const char *) |
static bool | isTrueFalse (const std::string &) |
static bool | isTrue (const char *) |
static bool | isTrue (const std::string &) |
static bool | isFalse (const char *) |
static bool | isFalse (const std::string &) |
static bool | isYesNo (const char *) |
static bool | isYesNo (const std::string &) |
static bool | isYes (const char *) |
static bool | isYes (const std::string &) |
static bool | isNo (const char *) |
static bool | isNo (const std::string &) |
static double | toDouble (const std::string) |
static int | toInt (const std::string) |
bool Utility::isFalse | ( | const char * | str | ) | [static] |
Is string False
Definition at line 122 of file utility.cpp.
References strtolower().
Referenced by isFalse(), and isTrueFalse().
bool Utility::isFalse | ( | const std::string & | str | ) | [static] |
Is string False
Definition at line 152 of file utility.cpp.
References isFalse().
bool Utility::isNo | ( | const char * | str | ) | [static] |
Is string No
Definition at line 202 of file utility.cpp.
References strtolower().
Referenced by isNo(), and isYesNo().
bool Utility::isNo | ( | const std::string & | str | ) | [static] |
Is string No
Definition at line 244 of file utility.cpp.
References isNo().
bool Utility::isTrue | ( | const char * | str | ) | [static] |
Is string True
Definition at line 101 of file utility.cpp.
References strtolower().
Referenced by isTrue(), isTrueFalse(), ProfileManager::set_autopersist(), and SmoothedNgramPredictor::set_learn().
bool Utility::isTrue | ( | const std::string & | str | ) | [static] |
Is string True
Definition at line 143 of file utility.cpp.
References isTrue().
bool Utility::isTrueFalse | ( | const char * | str | ) | [static] |
Is string either true or false
Definition at line 91 of file utility.cpp.
References isFalse(), and isTrue().
Referenced by isTrueFalse().
bool Utility::isTrueFalse | ( | const std::string & | str | ) | [static] |
Is string either true or false
Definition at line 161 of file utility.cpp.
References isTrueFalse().
bool Utility::isYes | ( | const char * | str | ) | [static] |
Is string Yes
Definition at line 179 of file utility.cpp.
References strtolower().
Referenced by isYes(), isYesNo(), and Selector::set_repeat_suggestions().
bool Utility::isYes | ( | const std::string & | str | ) | [static] |
Is string Yes
Definition at line 235 of file utility.cpp.
References isYes().
bool Utility::isYesNo | ( | const char * | str | ) | [static] |
Is string either yes or no
Definition at line 170 of file utility.cpp.
References isNo(), and isYes().
Referenced by isYesNo().
bool Utility::isYesNo | ( | const std::string & | str | ) | [static] |
Is string either yes or no
Definition at line 226 of file utility.cpp.
References isYesNo().
char * Utility::strtolower | ( | char * | str | ) | [static] |
Convert string to lower case
Definition at line 36 of file utility.cpp.
Referenced by ContextTracker::isCompletionValid(), isFalse(), isNo(), isTrue(), isYes(), SmoothedNgramPredictor::predict(), ARPAPredictor::predict(), and PredictorActivator::setCombinationPolicy().
std::string & Utility::strtolower | ( | std::string & | str | ) | [static] |
Convert string to lower case
Definition at line 48 of file utility.cpp.
std::string Utility::strtolower | ( | const std::string & | str | ) | [static] |
Returns a lower case copy of a string
Definition at line 61 of file utility.cpp.
std::string Utility::strtoupper | ( | const std::string & | str | ) | [static] |
Convert string to upper case
Definition at line 76 of file utility.cpp.
double Utility::toDouble | ( | const std::string | str | ) | [static] |
Convert string to double.
Definition at line 252 of file utility.cpp.
Referenced by SmoothedNgramPredictor::set_deltas(), RecencyPredictor::set_lambda(), RecencyPredictor::set_n_0(), and DictionaryPredictor::set_probability().
int Utility::toInt | ( | const std::string | str | ) | [static] |
Convert string to int.
Definition at line 260 of file utility.cpp.
Referenced by RecencyPredictor::set_cutoff_threshold(), Selector::set_greedy_suggestion_threshold(), Selector::set_suggestions(), DejavuPredictor::set_trigger(), PredictorActivator::setMaxPartialPredictionSize(), and PredictorActivator::setPredictTime().