Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/Common/MyString.cpp')
-rw-r--r--CPP/Common/MyString.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/CPP/Common/MyString.cpp b/CPP/Common/MyString.cpp
index 821c9b37..1a7b7056 100644
--- a/CPP/Common/MyString.cpp
+++ b/CPP/Common/MyString.cpp
@@ -322,6 +322,17 @@ bool IsString1PrefixedByString2(const wchar_t *s1, const char *s2) throw()
}
}
+bool IsString1PrefixedByString2_NoCase_Ascii(const char *s1, const char *s2) throw()
+{
+ for (;;)
+ {
+ char c2 = *s2++; if (c2 == 0) return true;
+ char c1 = *s1++;
+ if (c1 != c2 && MyCharLower_Ascii(c1) != MyCharLower_Ascii(c2))
+ return false;
+ }
+}
+
bool IsString1PrefixedByString2_NoCase_Ascii(const wchar_t *s1, const char *s2) throw()
{
for (;;)
@@ -650,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)
@@ -1293,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()
{