java - How to split a string or get the right text from string -


this question has answer here:

i need split string. right now, string contains this:

"rm 8 text"  

now want text printed in string builder using append, how rid of rm 8 in start of string?

right have done way, there has easier way.

string[] lines = fromserver.split("\\s+"); string line2 = lines[2];     logbuilder.append(line2); 

assuming standard format

string lastword = fromserver.substring(fromserver.lastindexof(" ")+1); 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -