Your Ad Here

Posted By

krisdb on 03/14/07


Tagged

ASP


Versions (?)

Chop last word


 / Published in: ASP
 

  1. Function ChopLastWord(Line,Length)
  2. Dim S1, S2, I
  3. ChopLastWord = ""
  4. S1 = Left( Line, Length )
  5. S2 = Left( Line, Length )
  6. For I = Len(S1) to 1 step -1
  7. if Mid(S1,I,1) = " " then
  8. S2 = Left(S1,I)
  9. I = 0
  10. end if
  11. Next
  12. ChopLastWord = S2
  13. End Function

Report this snippet  

You need to login to post a comment.