문제

I was calling a method as given here - to print the total address block.

Address add = AddressManager.getMyAddress(someId);
String totalAddr = FlexibleAddress.getAddressAsString(add , par1, par2);
out.print(totalAddr.toString());

The result of totalAddr.toString() is getting like ,

MyName
AddressLine1
AddressLine2
City

I need to remove the first line (ie MyName here) from this total address block. I have to cut the first line from the jsp page where it is displaying.

도움이 되었습니까?

해결책

Try with the below code

totalAddr = totalAddr.substring(totalAddr.indexOf('\n')+1);
out.print(totalAddr.toString());
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top