startsWith

fun Assert<CharSequence>.startsWith(other: CharSequence, ignoreCase: Boolean = false)

Asserts the char sequence starts with the expected char sequence.

Parameters

ignoreCase

true to compare ignoring case, the default if false.

See also


fun Assert<List<*>>.startsWith(vararg elements: Any?)

Asserts the list starts with the expected elements, in the same order.

1, 2, 3 startsWith 1, 2 pass 1, 2, 3 startsWith 2, 1 fails 1, 2, 3 startsWith 1, 2, 3 pass [] startsWith 1, 2 fails 1, 2 startsWith [] pass [] startsWith [] pass

See also