In Java, I’d like to extract seconds from time input strings of format like :
05h23m45s
How can I do so?
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.
If that’s your time format, just get the substring that starts right after the
min minutes.This code will return a
Stringcontaining all the characters after themand until thes.I strongly suggest you to read the String class documentation. The gimmicks it has are really useful when used right.