Suppose you have this string:
hiThere
What is the fastest way to find where the first upper case character is? (T in this example)
I am worried about performance as some words are quite long.
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.
Easiest would be to use preg_match (if there is only 1 match) or preg_match_all (if you want all the matches)
http://php.net/manual/en/function.preg-match.php
Not sure if it is the fastest..