kotest-assertions-core / io.kotest.matchers.string / kotlin.String / shouldBeEqualIgnoringCase

shouldBeEqualIgnoringCase

infix fun String?.shouldBeEqualIgnoringCase(other: String): Unit

Asserts that this is equal to other (ignoring case)

Verifies that this string is equal to other, ignoring case. Opposite of shouldNotBeEqualIgnoringCase

"foo" shouldBeEqualIgnoringCase "FoO"  // Assertion passes

"foo" shouldBeEqualIgnoringCase "BaR"  // Assertion fails

See Also

shouldNotBeEqualIgnoringCase

beEqualIgnoringCase