Commit Graph

3 Commits

Author SHA1 Message Date
Tomasz Sowa 040eb12c8b added: to convert/text
wchar_t ToLower(wchar_t c)
       wchar_t ToUpper(wchar_t c)
       void ToLower(std::wstring & s)
       void ToUpper(std::wstring & s)
       
       template<class StringType1, class StringType2>
       bool EqualNoCase(const StringType1 * str1, const StringType2 * str2)

       template<class StringType1, class StringType2>
       bool EqualNoCase(const StringType1 & str1, const StringType2 & str2)

       template<class StringType1, class StringType2>
       bool EqualNoCase(const StringType1 * str1_begin, const StringType1 * str1_end, const StringType2 * str2)

added: to space:
       Value * GetValueNoCase(const wchar_t * name);
       Value * GetValueNoCase(const std::wstring & name);
       const Value * GetValueNoCase(const wchar_t * name) const;
       const Value * GetValueNoCase(const std::wstring & name) const;

       
       



git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1111 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-05-25 17:12:28 +00:00
Tomasz Sowa cb23304885 added: to methods Toull(), Toll(), Toul(), Toui(), Tol(), Toi()
a new parameter: bool allow_skip_whitechars default true
added:   new methods: Toull_b(), Toll_b(), Toul_b(), Toui_b(), Tol_b(), Toi_b()
         automatically detects the base (radix):
           4323 - base 10
           0122 - base 8  (string starts with 0)
           #fff - base 16 (string starts with #)
           &101 - base 2  (string starts with &)
added:   CharType * SkipWhiteFromBack(CharType * str, bool check_additional_chars = true, bool treat_new_line_as_white = true)
         skipping white characters from the end of a string
changed: Toll_b(), Toull_b(), Tol_b() and Toul_b() are used in Space now
         for methods ToInt() etc so we are able to use a different base now
changed: some work in Space (const correctness)
       




git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1070 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-01-05 20:03:11 +00:00
Tomasz Sowa 7d51372844 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
2017-12-05 16:32:21 +00:00