startsWith

fun startsWith(prefix: String, ignoreCase: Boolean = false): StringRule(source)

Validate that the element starts with a given prefix.

Return

The rule on which this method has been invoked.

Parameters

prefix

The suffix the element should end with.

ignoreCase

Ignore distinction between upper- and lowercase if true.