Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetByteCount() [8/9]

unsafe override int System.Text.OSEncoding.GetByteCount ( string s)
inlinevirtual

Reimplemented from System.Text.Encoding.

Definition at line 53 of file OSEncoding.cs.

54 {
55 if (s == null)
56 {
57 throw new ArgumentNullException("s");
58 }
59 if (s.Length == 0)
60 {
61 return 0;
62 }
63 fixed (char* pChars = s)
64 {
65 return WideCharToMultiByte(_codePage, pChars, s.Length, null, 0);
66 }
67 }
readonly int _codePage
Definition OSEncoding.cs:5
static unsafe int WideCharToMultiByte(int codePage, char *pChars, int count, byte *pBytes, int byteCount)

References System.Text.OSEncoding._codePage, System.s, and System.Text.OSEncoding.WideCharToMultiByte().