Trim leading whitespace characters using trimMargin in Kotlin

Trim leading whitespace characters using trimMargin in Kotlin : Kotlin comes with a really handy function for string to trim leading whitespace characters easily. Known as trimMargin(), the definition of the function is as below : fun String.trimMargin(marginPrefix: String = “|”) – trimMargin is used to trim leading whitespace characters from each line of a […]