mediawiki-extensions-AbuseF.../tests/parserTests/strpos.t
Daimona Eaytoy 069fa064f5 Avoid passing invalid offset to mb_strpos
Bug: T285978
Change-Id: I3d100fd05f34fe3b01ecbbce5361badc613f9406
2021-07-02 14:07:46 +00:00

7 lines
229 B
Perl

strpos( "foobarfoo", "foo" ) === 0 &
strpos( "foobarfoo", "" ) === -1 &
strpos( "foobarfoo", "foo", 1 ) === 6 &
strpos( "foobarfoo", "lol" ) === -1 &
/* Offset not contained in the haystack */
strpos( "foo", "o", 123456 ) === -1