mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 12:54:15 +02:00
Adds implicit Span<char8> operator to String
This commit is contained in:
parent
fe74d58958
commit
aeb0e70d21
1 changed files with 7 additions and 0 deletions
|
@ -551,6 +551,13 @@ namespace System
|
||||||
return str.Ptr;
|
return str.Ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static implicit operator Span<char8>(String str)
|
||||||
|
{
|
||||||
|
if (str == null)
|
||||||
|
return .(null, 0);
|
||||||
|
return .(str.Ptr, str.Length);
|
||||||
|
}
|
||||||
|
|
||||||
[Commutable]
|
[Commutable]
|
||||||
public static bool operator==(String s1, String s2)
|
public static bool operator==(String s1, String s2)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue