rotateLeft

@JvmOverloads
fun String.rotateLeft(n: Int = 1): String

Rotates the String to the left by specified distance.

Example:

"abc".rotateLeft(2) // bca

Since

1.1.0

Parameters

n

number of elements rotate

See also

Throws

IllegalArgumentException

if n is negative or zero.