mirror of
https://github.com/crskycode/GARbro.git
synced 2024-10-23 07:38:16 +08:00
(StringExtensions): ToLowerShiftJis method overload for byte arrays.
This commit is contained in:
parent
0b52b4db80
commit
adfe0a6cea
@ -184,6 +184,12 @@ namespace GameRes.Formats
|
||||
public static byte[] ToLowerShiftJis (this string text)
|
||||
{
|
||||
var text_bytes = Encodings.cp932.GetBytes (text);
|
||||
text_bytes.ToLowerShiftJis();
|
||||
return text_bytes;
|
||||
}
|
||||
|
||||
public static void ToLowerShiftJis (this byte[] text_bytes)
|
||||
{
|
||||
for (int i = 0; i < text_bytes.Length; ++i)
|
||||
{
|
||||
byte c = text_bytes[i];
|
||||
@ -192,7 +198,6 @@ namespace GameRes.Formats
|
||||
else if (c > 0x7F && c < 0xA1 || c > 0xDF)
|
||||
++i;
|
||||
}
|
||||
return text_bytes;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user