Following a similar approach in #56404, implement case sensitivity based on request parameter for `indexOf` and `endsWith` string functions.