I need to get make a break inside a string that will output in HTML;
String str = "Hello <br /> There";
would output:
Hello
There
Try
String str = "Hello\nThere";
instead.
Might need to apply white-space: pre
or white-space: pre-wrap
to the style of the element where you're displaying the text, though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With