isBracketed

fun String.isBracketed(startChar: Char = '[', endChar: Char = ']'): Boolean

Returns true if this trimmed String starts with startChar and ends with endChar.

Parameters

startChar

the expected opening character (default '[')

endChar

the expected closing character (default ']')