1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Adds implicit Span<char8> operator to String

This commit is contained in:
xposure 2021-01-03 21:07:34 -05:00
parent fe74d58958
commit aeb0e70d21

View file

@ -551,6 +551,13 @@ namespace System
return str.Ptr;
}
public static implicit operator Span<char8>(String str)
{
if (str == null)
return .(null, 0);
return .(str.Ptr, str.Length);
}
[Commutable]
public static bool operator==(String s1, String s2)
{