yiisoft/yii2 — pull request #5318 by armab (2014-10-02 19:28:10+00:00)
Title: Add startsWith() and endsWith() for yii\helpers\StringHelper

See #5316

I've tested it in different ways with big strings and `mb_substr` way of `8bit` check is pretty efficient.
Case-insensitive check of course is much slower, where additional `mb_strtolower()` is triggered to ignore the case.