title: Issue with String Manipulation in Powershell TrimEnd()
body: <p>I have this PowerShell script that renames a file.  The following is part of the string manipulation code (not my actual code, just to show the issue):</p>
  
  <pre><code>$text="String1.txt"
  $text
  $text.trimend(".txt")
  $date=Get-Date -format yyyyMMdd
  $text + $date
  $newFile = $text.trimend(".txt") + "_" + $date + ".bak"
  $newFile
  $NewFile1 = $newFile.TrimEnd("_$date.bak") + ".bak"
  $NewFile1
  </code></pre>
  
  <p>The result is:</p>
  
  <pre><code>String1.txt
  String1
  String1.txt20131104
  String1_20131104.bak
  String.bak
  </code></pre>
  
  <p>Why was the <code>1</code> at the end of <code>String1</code> removed as well? I am expecting the result to be <code>String1.bak</code>.</p>