Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
Experts Most Trusted Topic
what is the best way to extract the first word from a string in java using -'java,string'
what is the best way to extract the first word from a string in java ¬†using -'java,string'
Trying to write a short method so that I can parse a string and extract the first word. I have been looking for the best way to do this.
I assume I would use str.split(","), however I would like to grab just the first first word from a string, and save that in one variable, and and put the rest of the tokens in another variable.
Is there a concise way of doing this?
Sep 7, 2015
to add a comment.
Related Hot Questions
Government Jobs Opening