Extra JavaScript string methods.