Merge branch 'master' into threads
All checks were successful
Builds / ExectOS (amd64, release) (push) Successful in 1m0s
Builds / ExectOS (amd64, debug) (push) Successful in 1m2s
Builds / ExectOS (i686, debug) (push) Successful in 44s
Builds / ExectOS (i686, release) (push) Successful in 41s

This commit is contained in:
2026-08-03 11:08:35 +02:00
14 changed files with 157 additions and 53 deletions

View File

@@ -18,12 +18,12 @@ namespace RTL
class String
{
public:
STATIC XTAPI SIZE_T CompareString(IN PCSTR String1,
IN PCSTR String2,
IN SIZE_T Length);
STATIC XTAPI SIZE_T CompareStringInsensitive(IN PCSTR String1,
IN PCSTR String2,
IN SIZE_T Length);
STATIC XTAPI LONG CompareString(IN PCSTR String1,
IN PCSTR String2,
IN SIZE_T Length);
STATIC XTAPI LONG CompareStringInsensitive(IN PCSTR String1,
IN PCSTR String2,
IN SIZE_T Length);
STATIC XTAPI PCHAR ConcatenateString(OUT PCHAR Destination,
IN PCHAR Source,
IN SIZE_T Count);

View File

@@ -18,12 +18,12 @@ namespace RTL
class WideString
{
public:
STATIC XTAPI SIZE_T CompareWideString(IN PCWSTR String1,
IN PCWSTR String2,
IN SIZE_T Length);
STATIC XTAPI SIZE_T CompareWideStringInsensitive(IN PCWSTR String1,
IN PCWSTR String2,
IN SIZE_T Length);
STATIC XTAPI LONG CompareWideString(IN PCWSTR String1,
IN PCWSTR String2,
IN SIZE_T Length);
STATIC XTAPI LONG CompareWideStringInsensitive(IN PCWSTR String1,
IN PCWSTR String2,
IN SIZE_T Length);
STATIC XTAPI PWCHAR ConcatenateWideString(OUT PWCHAR Destination,
IN PWCHAR Source,
IN SIZE_T Count);

View File

@@ -166,7 +166,7 @@ RtlCompareMemory(IN PCVOID LeftBuffer,
*/
XTCLINK
XTAPI
SIZE_T
LONG
RtlCompareString(IN PCSTR String1,
IN PCSTR String2,
IN SIZE_T Length)
@@ -192,7 +192,7 @@ RtlCompareString(IN PCSTR String1,
*/
XTCLINK
XTAPI
SIZE_T
LONG
RtlCompareStringInsensitive(IN PCSTR String1,
IN PCSTR String2,
IN SIZE_T Length)
@@ -218,7 +218,7 @@ RtlCompareStringInsensitive(IN PCSTR String1,
*/
XTCLINK
XTAPI
SIZE_T
LONG
RtlCompareWideString(IN PCWSTR String1,
IN PCWSTR String2,
IN SIZE_T Length)
@@ -244,7 +244,7 @@ RtlCompareWideString(IN PCWSTR String1,
*/
XTCLINK
XTAPI
SIZE_T
LONG
RtlCompareWideStringInsensitive(IN PCWSTR String1,
IN PCWSTR String2,
IN SIZE_T Length)

View File

@@ -26,7 +26,7 @@
* @since XT 1.0
*/
XTAPI
SIZE_T
LONG
RTL::String::CompareString(IN PCSTR String1,
IN PCSTR String2,
IN SIZE_T Length)
@@ -78,7 +78,7 @@ RTL::String::CompareString(IN PCSTR String1,
* @since XT 1.0
*/
XTAPI
SIZE_T
LONG
RTL::String::CompareStringInsensitive(IN PCSTR String1,
IN PCSTR String2,
IN SIZE_T Length)
@@ -124,6 +124,13 @@ RTL::String::CompareStringInsensitive(IN PCSTR String1,
Index++;
}
/* Check if one string ended before the other */
if((Length == 0 || Index < Length) && (String1[Index] != String2[Index]))
{
/* Strings are not equal */
return String1[Index] > String2[Index] ? 1 : -1;
}
/* Strings are equal */
return 0;
}

View File

@@ -26,7 +26,7 @@
* @since XT 1.0
*/
XTAPI
SIZE_T
LONG
RTL::WideString::CompareWideString(IN PCWSTR String1,
IN PCWSTR String2,
IN SIZE_T Length)
@@ -78,7 +78,7 @@ RTL::WideString::CompareWideString(IN PCWSTR String1,
* @since XT 1.0
*/
XTAPI
SIZE_T
LONG
RTL::WideString::CompareWideStringInsensitive(IN PCWSTR String1,
IN PCWSTR String2,
IN SIZE_T Length)
@@ -124,6 +124,13 @@ RTL::WideString::CompareWideStringInsensitive(IN PCWSTR String1,
Index++;
}
/* Check if one wide string ended before the other */
if((Length == 0 || Index < Length) && (String1[Index] != String2[Index]))
{
/* Wide strings are not equal */
return String1[Index] > String2[Index] ? 1 : -1;
}
/* Strings are equal */
return 0;
}