title: How to remove "1" from string if it is last character using vbscript
body: <p>I have got below code in VBSCript:</p>
  
  <pre><code>Function getFacilitiesNotes(objComp)
              Dim strFacilities
              strFacilities = strFacilities &amp; "&lt;div id =""facilities""&gt;"
              strFacilities = strFacilities &amp; "&lt;ul&gt;"
              For intCount = 1 to objComp.Fields.Item("Facilities").Value.Count
              strFacilities = strFacilities &amp; "&lt;li&gt;" &amp; objComp.Fields.Item("Facilities").value(intCount) &amp; "&lt;/li&gt;"
              Next
              strFacilities = strFacilities &amp; "&lt;/ul&gt;"
              strFacilities = strFacilities &amp; "&lt;/div&gt;"
              getFacilitiesNotes = strFacilities
  End Function
  </code></pre>
  
  <p>In above function the code <code>strFacilities = strFacilities &amp; "&lt;li&gt;" &amp; objComp.Fields.Item("Facilities").value(intCount) &amp; "&lt;/li&gt;"</code> may have below type of values while doing loop.</p>
  
  <p>1) ABC
  2) DFG1
  3) G231EG
  4) REWEREW1
  5) DSFWRE3
  6) YRTRWER1</p>
  
  <p>Now I want to remove "1" if it is the last character in the above strings while it is in loop.</p>
  
  <p>Please suggest!!</p>