let’s say I have this String:
String myString = "violet are blue|roses are red|this is a terrible poet";
I would like to trim the String whenever it found the char ‘|’. So when the code is executed, myString would be:
myString = "roses are red|this is a terrible poet";
and finally
myString = "this is a terrible poet";
is it possible?
usage