title: TCL command - string trim
body: <p>I was using the command 'string trimright' to trim my string but I found that this command trims more than required. </p>
  
  <p>My expression is "<strong>dssss.dcsss</strong>" If I use string trim command to trim the last few characters ".dcsss", it trims the entire string. How can I deal with this?</p>
  
  <p>Command:</p>
  
  <pre><code>     set a [string trimright "dcssss.dcsss" ".dcsss"]
       puts $a
  </code></pre>
  
  <p>Intended output:</p>
  
  <pre><code>    dcsss
  </code></pre>
  
  <p>Actual output </p>
  
  <pre><code>    ""
  </code></pre>