diff --git a/BeefLibs/corlib/src/String.bf b/BeefLibs/corlib/src/String.bf index 5daa6750..6a5346b1 100644 --- a/BeefLibs/corlib/src/String.bf +++ b/BeefLibs/corlib/src/String.bf @@ -551,6 +551,13 @@ namespace System return str.Ptr; } + public static implicit operator Span(String str) + { + if (str == null) + return .(null, 0); + return .(str.Ptr, str.Length); + } + [Commutable] public static bool operator==(String s1, String s2) {