These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Trim A String - Removing the last 3 Chars

ebbo1983
Registered: Mar 16 2009
Posts: 93
Answered

If I had strings such as below in my fields - how can i remove the last 3 chars

String 1 (1)
Test (2)
please remove the last 3 chars (3)
omg this is hard (7)

i been playing around left, right , ltrim and rtrim but i cant figure it out. so based on the above my fields should return

String 1
Test
please remove the last 3 chars
omg this is hard

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
Have you looked at the "Sbustr(s1, n1, n2)" funciton of FormCalc?
// from TextField1 remove the last 3 characters$ = Substr(TextField1, 0, (Len(TextField1) - 3) )

George Kaiser

ebbo1983
Registered: Mar 16 2009
Posts: 93
yes ive used it before, i dont have a programmers brain i guess:P

thankyou for your help