using uCalcSoftware;

var uc = new uCalc();
using (var s = new uCalc.String("root [child] end")) {
   
   // Get a live view of the block including the brackets
   var view = s.BetweenInclusive("'['", "']'");

   Console.WriteLine($"Initial parent string: {s}");
   Console.WriteLine($"Initial view: {view}");

   // Modify the view. The change will propagate to the parent.
   view.Replace("child", "MODIFIED");

   Console.WriteLine($"Final parent string: {s}");
}