Hello I was wandering how can I copy a piece of a String in Java until a character/symbol is found.
In my case the original string is: "hello.1234" and I want only "hello", so that every thing after the symbol . is discarded.
Any idea? many thanks
EDIT:
solved as follows:
String partBeforeFullStop = input.split("\\.")[0];
Use
String#indexOf(int)andString#substring(int).