added: functions for dealing with white characters:
bool IsWhite(wchar_t c, bool check_additional_chars, bool treat_new_line_as_white) (checking unicode white characters too)
CharType * SkipWhite(CharType * str, bool check_additional_chars = true, bool treat_new_line_as_white = true)
IsDigit(wchar_t c, int base, int * digit)
added: functions to converting from a string to an integer:
unsigned long long Toull(const CharType * str, int base = 10, const CharType ** after_str = 0, bool * was_overflow = 0)
long long Toll(const CharType * str, int base = 10, const CharType ** after_str = 0, bool * was_overflow = 0)
unsigned long Toul(const CharType * str, int base = 10, const CharType ** after_str = 0, bool * was_overflow = 0)
unsigned int Toui(const CharType * str, int base = 10, const CharType ** after_str = 0, bool * was_overflow = 0)
long Tol(const CharType * str, int base = 10, const CharType ** after_str = 0, bool * was_overflow = 0)
int Toi(const CharType * str, int base = 10, const CharType ** after_str = 0, bool * was_overflow = 0)
changed: some work in Space (new Api)
now Text() methods returns std::wstring by value (before they were returned by reference)
added std::wstring & TextRef() methods
added unsigned int UInt(), unsigned long ULong() and LongLong() and ULongLong()
GetValue() renamed to GetFirstValue()
AText() renamed to TextA() and they return std::string by value now
git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1066 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -1 +1 @@
|
||||
o = mainspaceparser.o
|
||||
o = mainspaceparser.o
|
||||
@@ -218,7 +218,7 @@ void MainSpaceParser::ParseMultiArgument(size_t argc, const char ** argv, size_t
|
||||
|
||||
void MainSpaceParser::AddValueToItem(const std::wstring & name, const std::wstring & empty_value, const std::vector<std::wstring> & list)
|
||||
{
|
||||
std::wstring * val = space->GetValue(name);
|
||||
std::wstring * val = space->GetFirstValue(name);
|
||||
|
||||
if( !val )
|
||||
{
|
||||
@@ -266,7 +266,7 @@ size_t MainSpaceParser::RequireOption(const std::wstring & arg)
|
||||
|
||||
if( options_space )
|
||||
{
|
||||
std::wstring * val = options_space->GetValue(arg);
|
||||
std::wstring * val = options_space->GetFirstValue(arg);
|
||||
|
||||
if( val )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user