I have written a startsWith(substring) extension that is applicable to nullable strings too. Unfortunatly my implmentation results in a StackOverflowError cause the extension calls it self an not the String.startsWith(..) method.
private fun String?.startsWith(sub: String): Boolean = this?.startsWith(sub)==true
Is is possible to call String.startsWith(..)?