startsWith

abstract fun startsWith(text: String, prefix: String): Boolean

判断字符串是否以指定前缀开始。

Parameters

text

源字符串

prefix

前缀