<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Sat, 13 Jun 2026 14:36:33 +0000</lastBuildDate>
    <item>
      <title>(C#) Replacing characters with escape sequences - quangnd</title>
      <link>https://snipplr.com/view/26227/replacing-characters-with-escape-sequences</link>
      <description>&lt;p&gt;Another common task when working with strings is to replace a set of characters with a set of escape sequences. Sometimes the replacement is very easy - you only have to place a backslash (or another character) before every occurrence of an escaped character.&#13;
&#13;
Imagine the following scenario: you are building an RTF file and you want to insert a string into the file. The "{", "}", and "\" characters have a special meaning in RTF and, therefore, must be preceded with a backslash. The question is: what is the fastest way to replace each of the characters with a corresponding escape sequence?&lt;/p&gt;</description>
      <pubDate>Sun, 10 Jan 2010 22:45:51 UTC</pubDate>
      <guid>https://snipplr.com/view/26227/replacing-characters-with-escape-sequences</guid>
    </item>
  </channel>
</rss>
