开发者

String Replace operation in GWT 2.0.4

I am using GWT 2.0.4 and want to perform the trivial operation of replacing string. Something which can be done using java.lang in java,开发者_运维技巧 and since GWT doesn't support Java libraries and I want to avoid writing a JSNI, is there a way to do a string replace, Is there anything i am missing or might not knw? Latest version of GWT,which is just an RC, 2.1 has a library called com.google.gwt.regexp which have something as simple as originalString.replace(Expression String, Replacement String) but since it is RC, I cannot use it here, Any suggestions are appreciated and Thanks for helping.


String.replaceAll() (any any java.lang method listed here) works in GWT.

Furthermore, it's incorrect to say "GWT doesn't support Java libraries" -- GWT supports lots of Java libraries, and many that aren't immediately usable can be made GWT compatible with a little work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜