We have a string that has a maximum limit of 20 words. If the user enters something that is more than 20 words, we then need to truncate the string at its 20th word. How can we automate this? We are able to find the 20th token with #GetToken(myString, 20, ‘ ‘)#, but are unsure on how to find it’s position in order to left-trim. Any ideas?
Thanks in advance.
We have a string that has a maximum limit of 20 words. If the
Share
The UDF ListLeft() should do what you want. It takes a list and returns the list with the number of elements you define. “Space” is fine as a delimiter.
p.s. CFLIB.org is an outstanding resource, and is usually my first stop when I’m looking for something like this. I recommend it highly.