Posts: 27
Threads: 14
Joined: Jan 2009
Reputation:
0
01-31-2009, 12:56 AM
(This post was last modified: 01-31-2009, 01:08 AM by bostonma.)
Hi,
I have to write some code that will replace space in aword with %10.
For ex: "credit card" should be "credit%10card"
How can this be done?Any help plz.
credit card amount is $500.
same has to be turned out as :
credit%10card%10amount%10is%10$500.
Posts: 1,105
Threads: 18
Joined: Jan 2008
Reputation:
8
01-31-2009, 11:16 AM
Use split function to bring each word into substrings and then use join function with delimiter %10.
Posts: 27
Threads: 14
Joined: Jan 2009
Reputation:
0
02-03-2009, 02:18 AM
Thanks much Manojith.Replace function worked.
Posts: 1,105
Threads: 18
Joined: Jan 2008
Reputation:
8
02-03-2009, 08:59 AM
Ya replace is a shorter option.
I think split and join with delimiter %10 should also work. Did you try that?
Posts: 36
Threads: 8
Joined: Nov 2008
Reputation:
0
02-03-2009, 11:49 AM
Hi Ankur,
Split and join function is also an alternative for the problem mentioned.