Fixed many invalid uses of StringView::GetText(), where a null-terminated string was required.

Renamed GetText() to GetNonTerminatedText() to reduce chance of same bugs appearing in the future.
This commit is contained in:
Zbigniew Skowron
2021-08-08 22:04:54 +02:00
parent 6ac0d5d3f4
commit aecc81f5e5
14 changed files with 158 additions and 108 deletions

View File

@@ -120,36 +120,36 @@ public:
public:
// Compare two strings with case sensitive
// Compare two strings with case sensitive. Strings must not be null.
static int32 Compare(const Char* str1, const Char* str2);
// Compare two strings without case sensitive
// Compare two strings without case sensitive. Strings must not be null.
static int32 Compare(const Char* str1, const Char* str2, int32 maxCount);
// Compare two strings without case sensitive
// Compare two strings without case sensitive. Strings must not be null.
static int32 CompareIgnoreCase(const Char* str1, const Char* str2);
// Compare two strings without case sensitive
// Compare two strings without case sensitive. Strings must not be null.
static int32 CompareIgnoreCase(const Char* str1, const Char* str2, int32 maxCount);
// Compare two strings with case sensitive
// Compare two strings with case sensitive. Strings must not be null.
static int32 Compare(const char* str1, const char* str2);
// Compare two strings without case sensitive
// Compare two strings without case sensitive. Strings must not be null.
static int32 Compare(const char* str1, const char* str2, int32 maxCount);
// Compare two strings without case sensitive
// Compare two strings without case sensitive. Strings must not be null.
static int32 CompareIgnoreCase(const char* str1, const char* str2);
// Compare two strings without case sensitive
// Compare two strings without case sensitive. Strings must not be null.
static int32 CompareIgnoreCase(const char* str1, const char* str2, int32 maxCount);
public:
// Get string length
// Get string length. Returns 0 if str is null.
static int32 Length(const Char* str);
// Get string length
// Get string length. Returns 0 if str is null.
static int32 Length(const char* str);
// Copy string