title: how to replace a string having single quote with some characters in C#
body: <p>I need a code which will search if a string contains single quote <kbd>'</kbd> before a character and that single quote should be replaced with two single quotes <kbd>'</kbd><kbd>'</kbd>.</p>
  
  <p>example-: </p>
  
  <pre><code>input = "test's"
  output = "test''s"
  
  input = "test'"
  output = "test'"
  
  input = "test' "
  output = "test' "
  </code></pre>