If we're decrementing end, why not just check the end character to see if it's a semicolon?