A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Originally posted by Lynette Dawson:
i dont understand the question - tell me what you get when you try to save this string to the database and bring it back.
the quic'k bro"wn fox
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Originally posted by William Brogden:
I know of no way around it, you have to find out every single one of the possible oddball codes and their replacements and handle them one at a time. You might be able to speed things up by checking for more than one character at a time - take a look at the source for the String.replace method for inspiration.
Please note that the slowest thing in the code you show is probably the getting a separate database connection for each request. In production code you would certainly use a connection pool.
Dont assume you have a performance problem until you have run tests. How big are these chunks of text anyway?
Bill
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Marcus
SCJP, March '02
so is ther any otherway to overcome this problem