1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Added HasMultibyteChars properties

This commit is contained in:
Brian Fiete 2024-10-24 14:58:36 -04:00
parent 9501ee2c22
commit c12c1bf9f9

View file

@ -2745,6 +2745,20 @@ namespace System
return UTF8Enumerator(Ptr, startIdx, mLength);
}
public bool HasMultibyteChars
{
get
{
char8* ptr = Ptr;
int len = Length;
for (int i < len)
if (ptr[i] >= '\x80')
return true;
return false;
}
}
[Obsolete("HasMultibyteChars() method has been replaced with the HasMultibyteChars property")]
public bool HasMultibyteChars()
{
char8* ptr = Ptr;
@ -3707,6 +3721,19 @@ namespace System
}
}
public bool HasMultibyteChars
{
get
{
char8* ptr = Ptr;
int len = Length;
for (int i < len)
if (ptr[i] >= '\x80')
return true;
return false;
}
}
public int GetHashCode()
{
return String.[Friend]GetHashCode(mPtr, mLength);