simple jsp string comparison

J

Jason

Hi,

In JSP do we have a built in function like left() if we want to evalue a
string's left some characters?
Thanks.

Jason
 
P

Phil Hanna

Hi,

In JSP do we have a built in function like left() if we want to evalue a
string's left some characters?
Thanks.

String a = "ABCDEFG";
String firstFour = a.substring(0, 4);

firstFour will contain "ABCD"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top