I'd use url.charAt(0) instead, it's not much longer and it is ES3 compatible.