rotateRight

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

Rotates the String to the right by specified distance.

Example:

"abc".rotateRight(2) // cab

Since

1.1.0

Parameters

n

number of elements rotate

See also

Throws

IllegalArgumentException

if n is negative or zero.