public static String *Create(string str) { #if NETFRAMEWORK || NETSTANDARD2_0 fixed(char *p = str) return(Ultralight.CreateStringUTF16(p, (UIntPtr)(uint)str.Length)); #else return(Create((ReadOnlySpan <char>)str)); #endif }
public static String *Create(ReadOnlySpan <char> utf16) { fixed(char *p = utf16) return(Ultralight.CreateStringUTF16(p, (UIntPtr)(uint)utf16.Length)); }