case insensitive Pos

前端 未结 9 1517
一个人的身影
一个人的身影 2021-02-02 00:56

Is there any comparable function like Pos that is not case-sensitive in D2010 (unicode)?

I know I can use Pos(AnsiUpperCase(FindString), AnsiUpperCase(SourceString)) but

9条回答
  •  再見小時候
    2021-02-02 01:19

    Why not just convert the both the substring and the source string to lower or upper case within the regular Pos statement. The result will effectively be case-insensitive because both arguments are all in one case. Simple and lite.

提交回复
热议问题