mirror of
https://github.com/aaru-dps/Aaru.Helpers.git
synced 2025-12-16 19:24:35 +00:00
Pass string interpolation.
This commit is contained in:
@@ -69,7 +69,7 @@ public static partial class ArrayHelpers
|
||||
var sb = new StringBuilder();
|
||||
|
||||
for(long i = 0; i < array.LongLength; i++)
|
||||
sb.AppendFormat("{0:x2}", array[i]);
|
||||
sb.Append($"{array[i]:x2}");
|
||||
|
||||
return upper ? sb.ToString().ToUpper() : sb.ToString();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public static class PrintHex
|
||||
sb.Append(" ");
|
||||
|
||||
for(var i = 0; i < width; i++)
|
||||
sb.AppendFormat(" {0:X2}", i);
|
||||
sb.Append($" {i:X2}");
|
||||
|
||||
if(color)
|
||||
sb.Append("\u001b[0m");
|
||||
@@ -114,7 +114,7 @@ public static class PrintHex
|
||||
|
||||
for(var j = 0; j < lastBytes; j++)
|
||||
{
|
||||
sb.AppendFormat(" {0:X2}", array[b]);
|
||||
sb.Append($" {array[b]:X2}");
|
||||
b++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user