Re: how to insert space in a string



KC <kenchengtk@xxxxxxxxx> wrote in
news:ff4beec7-75fb-4b98-8979-3e77f82ca4c3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:


thx for reply, I have try thr string.function(s), like .compare... but
not sure which one is capable for this case, if for vb syntax, I know
how to findout the exact postion of newline char in the string var,
but java, I have no idea


Java is very well documented in the internet.

Just google "java string" and click the javadoc link which will come. That
works for every class.

Java String has indexOf() -method which you can you to get the exact
position of newline char in the string var.

int pos = myString.indexOf("\r\n");

.