Announcement

Collapse
No announcement yet.

is there a trim function where you can specify what character to trim?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    is there a trim function where you can specify what character to trim?

    I know
    <mvt:assign name="g.return_value" value="rtrim( string )" />
    strips off spaces if they exist at the right end of the string. what I"m looking for is something like
    <mvt:assign name="g.return_value" value="rtrim( string , char )" />
    which would strip off the right most character if it matches what I specify.

    is there such a thing?

    #2
    No, but you could build it yourself. You could use substring to grab the last characters you need, then compare them to your character you want to remove and if it matches then do the trim (if not, don't trim)
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      that's what I did.. thanks brennan

      Comment

      Working...
      X