Added caseInsensative argument to endsWith and startsWith