Tools.h++ Class Reference

Table Of Contents
y Year of the century, from 00 (deprecated) 84
Y Year 1984
Z Time zone name [from tm::tm_isdst] PST or PDT
virtual RWBoolean
stringToDate(const RWCString&, struct tm*) const = 0;
Interprets the RWCString as a date, and extracts the month, day, and year components to
the tm argument. It returns TRUE for a valid date, FALSE otherwise. If it returns
FALSE, the struct tm argument is untouched; otherwise it sets the tm_mday, tm_mon,
and tm_year members. If the date is entered as three numbers, the order expected is the
same as that produced by strftime(). Note that this function cannot reject all invalid date
strings.
The following are examples of valid date strings in an English-speaking locale:
"Jan 9, 62" "1/9/62" "January 9 1962"
"09Jan62" "010962"
virtual RWBoolean
stringToTime(const RWCString&, struct tm*) const = 0;
Interprets the RWCString argument as a time, with hour, minute, and optional second. If
the hour is in the range [1..12], the local equivalent of "AM" or "PM" is allowed. Returns
TRUE for a valid time string, FALSE for an error. If it returns FALSE, the tm argument
is untouched; otherwise it sets the tm_hour, tm_min, and tm_sec members. Note that this
function cannot reject all invalid time strings. The following are examples of valid time
strings in an English-speaking locale:
"1:10 AM" "13:45:30" "12.30.45pm"
"PM 3:15" "1430"
virtual RWBoolean
stringToMoney(const RWCString&, double*,
RWLocale::CurrSymbol=LOCAL) const = 0;
Interprets the RWCString argument as a monetary value. The currency symbol, if any, is
ignored. Negative values may be specified by the negation symbol or by enclosing
parentheses. Digit group separators are optional; if present they are checked. Returns
TRUE for a valid monetary value, FALSE for an error. If it returns FALSE, the double*
argument is untouched; otherwise it is set to the integral number of monetary units
entered (e.g. cents, in a U.S. locale).
const RWLocale*
imbue(ios& stream) const;
Installs self in the stream argument, for later use by the operators << and >> (e.g. in