I afraid that how can u use string function in the visual force page??? split is a string function in which u have used it in the visual page. Instead u can use the split function in the controller page. please check it out whether we can use the split function in VF Page or not.
String methods are available in
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_string.htm
String s='Red-dy hello';
String stringAfterHyphen = s.split('-')[1];
I need the requirement to implement in VIsualForce page.
{!(myStringVariable.split('-')[1])}
I have tried this...But throwing an error syntax error
eg: Syntax error. Missing '}'
hi street,
I afraid that how can u use string function in the visual force page??? split is a string function in which u have used it in the visual page. Instead u can use the split function in the controller page. please check it out whether we can use the split function in VF Page or not.
Street,
You cannot use this function in the VF page.
Use this in Apex Class (Controller) :
String s=Red-dy hello;
Public string[] NewS{get;set;}
NewS = s.Split('-')[1];
Where ever required on VF you can use {!NewS}