Created
December 1, 2025 20:02
-
-
Save mrenouf/53761f5dc1962b39c7e4b16ff1804a4b to your computer and use it in GitHub Desktop.
Kotlin String extension that should exist: `fun indexAfter(token: String): Int`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private fun String.indexAfter(token: String): Int { | |
| return indexOf(token).let { if (it < 0) -1 else it + token.length } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment