i have assigned a string to a variable and want to display the string in 2 lines. expected result:
Sample Code
Vf Page
<apex:page controller="BreakString1Controller">
<apex:outputText value="{!str2}"></apex:outputText>
</apex:page>
Controller code
public class BreakString1Controller {
public string str1 = 'Quick brown fox jumps \n '+' <br/>'+' over the lazy dog';
public string str2 {get; set;}
public BreakString1Controller (){
str2 = str1;
}
}
Split()
function as well