View Single Post
  #1 (permalink)  
Old 05-07-2008, 02:15 AM
wprjr wprjr is offline
Member
 
Join Date: May 2008
Posts: 1
wprjr is on a distinguished road
replacing last comma in a string with the word "or"
Hi,

This is my first post (and probably not my last!). I am just getting back to JSP, JSTL in particular, after being away from minor dabbling in it six years ago. I guess I'm practically a noob, so might as well start of with a good question...

I have a variable containing the string "a,b,c,d,e."

I need to replace the last "," with the word "or" (i.e. "a,b,c,d,e" becomes "a,b,c,d or e").

I know fn:indexOf is probably the best solution, but I have no clue as to the entire syntax of making this happen. Any help is greatly appreciated.


Thanks,

Bill
Reply With Quote
Sponsored Links