In Java we have indexOf and lastIndexOf. Is there anything like lastSubstring? It should work like :
"aaple".lastSubstring(0, 1) = "e";
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not in the standard Java API, but …
Apache Commons has a lot of handy String helper methods in StringUtils
… including
StringUtils.right(“apple”,1)
http://commons.apache.org/lang/api/org/apache/commons/lang/StringUtils.html#right(java.lang.String,%20int)
just grab a copy of commons-lang.jar from commons.apache.org