indexOf Case Sensitive?

后端 未结 19 1231
日久生厌
日久生厌 2020-11-27 19:39

Is the indexOf(String) method case sensitive? If so, is there a case insensitive version of it?

19条回答
  •  渐次进展
    2020-11-27 19:54

    Just to sum it up, 3 solutions:

    • using toLowerCase() or toUpperCase
    • using StringUtils of apache
    • using regex

    Now, what I was wondering was which one is the fastest? I'm guessing on average the first one.

提交回复
热议问题