Imported Upstream version 5.10.0.69

Former-commit-id: fc39669a0b707dd3c063977486506b6793da2890
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-01-29 19:03:06 +00:00
parent d8f8abd549
commit e2950ec768
6283 changed files with 453847 additions and 91879 deletions

View File

@@ -1359,6 +1359,16 @@ namespace System.Text
return String.CreateStringFromEncoding(bytes, byteCount, this);
}
#if MONO
public unsafe string GetString(ReadOnlySpan<byte> bytes)
{
fixed (byte* bytesPtr = &bytes.DangerousGetPinnableReference())
{
return GetString(bytesPtr, bytes.Length);
}
}
#endif
// Returns the code page identifier of this encoding. The returned value is
// an integer between 0 and 65535 if the encoding has a code page
// identifier, or -1 if the encoding does not represent a code page.