From be02dcefc9efe35e762ba0da9b9fd895145c7b83 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Sun, 25 Feb 2024 20:07:38 -0700 Subject: [PATCH] string interpolation --- Terminal.Gui/Views/HexView.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Terminal.Gui/Views/HexView.cs b/Terminal.Gui/Views/HexView.cs index 18641103e..700f322c1 100644 --- a/Terminal.Gui/Views/HexView.cs +++ b/Terminal.Gui/Views/HexView.cs @@ -1,4 +1,4 @@ -// +// // HexView.cs: A hexadecimal viewer // // TODO: @@ -380,7 +380,7 @@ public class HexView : View Move (0, line); Driver.SetAttribute (ColorScheme.HotNormal); - Driver.AddStr (string.Format ("{0:x8} ", displayStart + line * nblocks * bsize)); + Driver.AddStr ($"{displayStart + line * nblocks * bsize:x8} "); currentAttribute = ColorScheme.HotNormal; SetAttribute (GetNormalColor ()); @@ -401,7 +401,7 @@ public class HexView : View SetAttribute (GetNormalColor ()); } - Driver.AddStr (offset >= n && !edited ? " " : string.Format ("{0:x2}", value)); + Driver.AddStr (offset >= n && !edited ? " " : $"{value:x2}"); SetAttribute (GetNormalColor ()); Driver.AddRune (SpaceCharRune); }