I am trying to split a string in two, at a set distance, but it needs
to be between words. I am able to do a left(string,250) no
problem, but it could end up in the middle of a word.
Any easy ideas?
Thanks for trying to help, but I figured it out. I guess I shouldn't have said strings, what I was trying to do is take a whole sentence and split it into two
seperate ones, but couldn't have it split in the middle of a
word. I ended up using InStrRev.
Thanks again
Edited by BradSullivan on April/21/2005 at 12:52pm
What I was trying to do was split a sentence in half, but make sure it wasn't in the middle of a word, which is done with:
left(MyInput,InStrRev( MyInput, " ",2000))
It's like doing a left(MyInput,2000) which returns the first 2000 characters, but the "InStrRev" makes sure its at a space.
You can get the remainder of the sentence using:
right(MyInput,len(MyInput) - InStrRev( MyInput, " ",2000))
You cannot add new info in this area You cannot add to info in this area You cannot delete your info in this area You cannot edit your info in this area You cannot create polls in this area You cannot vote in polls in this area