title: C#: How do I prepend text to each line in a string?
body: <p>What would an implementation of 'MagicFunction' look like to make the following (nunit) test pass?</p>
  
  <pre><code>public MagicFunction_Should_Prepend_Given_String_To_Each_Line()
  {
      var str = @"line1
  line2
  line3";
  
      var result = MagicFunction(str, "-- ");
  
      var expected = @"-- line1
  -- line2
  -- line3";
  
      Assert.AreEqual(expected, result);
  }
  </code></pre>