how would I trim a mix of newline and space characters from the beginning and en

how would I trim a mix of newline and space characters from the beginning and end of a text string? For example,
"
this is
a string

" becomes
"this is
a string"

OriginalPostID-174728

OriginalPostID-174728

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Stewart Burchell

    It's hard to know exaclty what the original poster's use case was from over 4 years ago, but it seems to me that they didn't want to remove all newlines, just extraneous ones (seemingly only at the beginning or end of a string).  I'm sure there's now a more graceful coding solution than the original one I posted so long ago, though it's always fun to see my name pop up in a newly-revived thread.

Children
No Data