This commit is contained in:
Igor Pavlov
2021-11-28 19:08:41 -08:00
committed by fn ⌃ ⌥
parent 1194dc9353
commit ccbf6ad3c1
43 changed files with 1380 additions and 259 deletions

View File

@@ -661,6 +661,12 @@ void AString::Add_UInt32(UInt32 v)
_len = (unsigned)(ConvertUInt32ToString(v, _chars + _len) - _chars);
}
void UString::Add_UInt64(UInt64 v)
{
Grow(20);
_len = (unsigned)(ConvertUInt64ToString(v, _chars + _len) - _chars);
}
void AString::SetFrom(const char *s, unsigned len) // no check
{
if (len > _limit)
@@ -1304,6 +1310,12 @@ void UString::Add_UInt32(UInt32 v)
_len = (unsigned)(ConvertUInt32ToString(v, _chars + _len) - _chars);
}
void AString::Add_UInt64(UInt64 v)
{
Grow(20);
_len = (unsigned)(ConvertUInt64ToString(v, _chars + _len) - _chars);
}
int UString::Find(const wchar_t *s, unsigned startIndex) const throw()
{

View File

@@ -367,6 +367,7 @@ public:
AString &operator+=(const AString &s);
void Add_UInt32(UInt32 v);
void Add_UInt64(UInt64 v);
void SetFrom(const char *s, unsigned len); // no check
void SetFrom_CalcLen(const char *s, unsigned len);
@@ -633,6 +634,7 @@ public:
UString &operator+=(const AString &s) { return operator+=(s.Ptr()); }
void Add_UInt32(UInt32 v);
void Add_UInt64(UInt64 v);
UString Mid(unsigned startIndex, unsigned count) const { return UString(count, _chars + startIndex); }
UString Left(unsigned count) const { return UString(count, *this); }