mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
properly quote char
This commit is contained in:
parent
6c03b8c8c9
commit
ea0a76142a
2 changed files with 8 additions and 2 deletions
|
@ -1130,7 +1130,10 @@ namespace System.Reflection
|
|||
strBuffer.Append((*(bool*)&mValue) ? "true" : "false");
|
||||
case typeof(char8), typeof(char16), typeof(char32):
|
||||
strBuffer.Append('\'');
|
||||
(*(char32*)&mValue).ToString(strBuffer);
|
||||
var str = (*(char32*)&mValue).ToString(.. scope .());
|
||||
let len = str.Length;
|
||||
String.QuoteString(&str[0], len, str);
|
||||
strBuffer.Append(str[(len + 1)...^2]);
|
||||
strBuffer.Append('\'');
|
||||
case typeof(uint64), typeof(uint):
|
||||
(*(uint64*)&mValue).ToString(strBuffer);
|
||||
|
|
|
@ -1130,7 +1130,10 @@ namespace System.Reflection
|
|||
strBuffer.Append((*(bool*)&mValue) ? "true" : "false");
|
||||
case typeof(char8), typeof(char16), typeof(char32):
|
||||
strBuffer.Append('\'');
|
||||
(*(char32*)&mValue).ToString(strBuffer);
|
||||
var str = (*(char32*)&mValue).ToString(.. scope .());
|
||||
let len = str.Length;
|
||||
String.QuoteString(&str[0], len, str);
|
||||
strBuffer.Append(str[(len + 1)...^2]);
|
||||
strBuffer.Append('\'');
|
||||
case typeof(uint64), typeof(uint):
|
||||
(*(uint64*)&mValue).ToString(strBuffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue