- utf8 auxiliary functions moved to utf8_private.h file
- in utf8.h are shown only functions available for consumers
- template functions has been moved to utf8_template.h (in utf8.h are only declarations)
utf8_template.h is included at the end of utf8.h
- functions which take std::ostream changed to template (the stream is a template argument now)
template<class StringType> void Toa(unsigned long long value, StringType & res, bool clear_string = true, int base = 10);
template<class StringType> void Toa(long long value, StringType & res, bool clear_string = true, int base = 10);
template<class StringType> void Toa(unsigned long value, StringType & res, bool clear_string = true, int base = 10);
template<class StringType> void Toa(long value, StringType & res, bool clear_string = true, int base = 10);
template<class StringType> void Toa(unsigned int value, StringType & res, bool clear_string = true, int base = 10);
template<class StringType> void Toa(int value, StringType & res, bool clear_string = true, int base = 10);
template<class StringType> void Toa(unsigned short value, StringType & res, bool clear_string = true, int base = 10);
template<class StringType> void Toa(short value, StringType & res, bool clear_string = true, int base = 10);
std::wstring Toa(unsigned long long value, int base);
std::wstring Toa(long long value, int base);
std::wstring Toa(unsigned long value, int base);
std::wstring Toa(long value, int base);
std::wstring Toa(unsigned int value, int base);
std::wstring Toa(int value, int base);
std::wstring Toa(unsigned short value, int base);
std::wstring Toa(short value, int base);
did not have 'const' modifier and there was an error when compiling with clang with -std=c++20 flag
/usr/home/tomek/roboczy/prog/web.ttmath.org/../pikotools/textstream/textstream.h:225:11: fatal error: use of overloaded operator '!=' is ambiguous (with operand types
'PT::TextStreamBase<char, 256, 4096>::const_iterator' (aka 'PT::MemBuffer<char, 256, 4096>::const_iterator') and 'PT::TextStreamBase<char, 256, 4096>::const_iterator')
for( ; i != end() ; ++i)
~ ^ ~~~~~
/usr/home/tomek/roboczy/prog/web.ttmath.org/../morm/src/finderhelper.h:78:14: note: in instantiation of member function 'PT::TextStreamBase<char, 256, 4096>::to_string' requested here
table_name.to_string(table_name_str);
^
/usr/home/tomek/roboczy/prog/web.ttmath.org/../pikotools/membuffer/membuffer.h:93:8: note: candidate function
bool operator!=(const const_iterator & i);
^
/usr/home/tomek/roboczy/prog/web.ttmath.org/../pikotools/membuffer/membuffer.h:92:8: note: candidate function
bool operator==(const const_iterator & i);
^
/usr/home/tomek/roboczy/prog/web.ttmath.org/../pikotools/membuffer/membuffer.h:92:8: note: candidate function (with reversed parameter order)
minimal width for integers
added: to Log: operator<<(long long s)
added: to TextStreamBase:
operator<<(long long);
operator<<(unsigned long long);
int_min_width(size_t min_width); // minimal width for integers
git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1167 e52654a7-88a9-db11-a3e9-0013d4bc506e
for replacing parameters in patterns e.g. Replace("param %0", "first param")
git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1163 e52654a7-88a9-db11-a3e9-0013d4bc506e
renamed Logger -> Log
this class has an api (<< operators) for taking what should be put to the log file
as the buffer is used WTextStream which should be allocated elsewhere
added: FileLog - this class saves to a file log
git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1149 e52654a7-88a9-db11-a3e9-0013d4bc506e
fixed: when serializing Date the year has at least 4 digits
e.g. 0001 when the year is equal to one
git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1093 e52654a7-88a9-db11-a3e9-0013d4bc506e
outputs to the given stream: YYYY-MM-DDTHH:MM:SSZ, eg: 1990-02-12T13:05:39Z
added: parsing date in a format: YYYY-MM-DDTHH:MM:SS ('T' letter given)
git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1089 e52654a7-88a9-db11-a3e9-0013d4bc506e
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
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
template<typename in_item_type>
void append(const in_item_type * item_array, size_t len);
when adding values from item_array are casted to the type of the internal buffer
changed: some minor optimizations in Space (in Add() methods with WTextStream as an argument)
changed: removed following write() methods from TextStreamBase:
TextStreamBase & write(const char * buf, size_t len);
TextStreamBase & write(const wchar_t * buf, size_t len);
and added a template instead:
template<typename in_buffer_type>
TextStreamBase & write(const in_buffer_type * buf, size_t len);
this allows to write char* buffer to TextStreamBase<wchar_t...> (and vice versa)
added: two write() methods to TextStreamBase:
write(const char * format, double val);
write(const wchar_t * format, double val);
converting double value to the text (format is the same as in snprintf)
git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@448 e52654a7-88a9-db11-a3e9-0013d4bc506e