title: Kotlin add carriage return into multiline string
body: <p>In Kotlin, when I build a multiline string like this:</p>
  
  <pre><code>value expected = """
                  |digraph Test {
                  |${'\t'}Empty1;
                  |${'\t'}Empty2;
                  |}
                  |""".trimMargin()
  </code></pre>
  
  <p>I see that the string lacks carriage return characters (ASCII code 13) when I output it via:</p>
  
  <pre><code>println("Expected bytes")
  println(expected.toByteArray().contentToString())
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Expected bytes
  [100, 105, 103, 114, 97, 112, 104, 32, 84, 101, 115, 116, 32, 123, 10, 9, 69, 109, 112, 116, 121, 49, 59, 10, 9, 69, 109, 112, 116, 121, 50, 59, 10, 125, 10]
  </code></pre>
  
  <p>When some code I'm trying to unit test builds the same String via a <code>PrintWriter</code> it delineates lines via the <code>lineSeparator</code> property:</p>
  
  <pre><code>/* 
   * Line separator string.  This is the value of the line.separator
   * property at the moment that the stream was created.
   */
  </code></pre>
  
  <p>So I end up with a string which <em>looks</em> the same in output, but is composed of different bytes and thus is not equal:</p>
  
  <pre><code>Actual bytes
  [100, 105, 103, 114, 97, 112, 104, 32, 84, 101, 115, 116, 32, 123, 13, 10, 9, 69, 109, 112, 116, 121, 49, 59, 13, 10, 9, 69, 109, 112, 116, 121, 50, 59, 13, 10, 125, 13, 10]
  </code></pre>
  
  <p>Is there a better way to address this <em>during string declaration</em> than splitting my multiline string into concatenated stringlets which can each be suffixed with <code>char(13)</code>?  </p>
  
  <p>Alternately, I'd like to do something like:  </p>
  
  <pre><code>value expected = """
                  |digraph Test {
                  |${'\t'}Empty1;
                  |${'\t'}Empty2;
                  |}
                  |""".trimMargin().useLineSeparator(System.getProperty("line.separator"))
  </code></pre>
  
  <p>or <code>.replaceAll()</code> or such.</p>
  
  <p>Does any standard method exist, or should I add my own extension function to String?</p>