I want to use string.startsWith() method but ignoring the case.
string.startsWith()
Suppose I have String "Session" and I use startsWith on "sEsSi" then it should return true.
String
startsWith
true
How can I achieve this?
Use toUpperCase() or toLowerCase() to standardise your string before testing it.
toUpperCase()
toLowerCase()
2.1m questions
2.1m answers
60 comments
57.0k users