This task will show you some functions of strings. You may already know them. Anyway, it will be great if you solve this problem!
The task here is to decode a string:
i
, remove the first symbol. The string will contain a number. Print the number + 1.s
, remove the first symbol. Then print the reversed remainder.Here are string functions that you can use:
.first()
returns the first
symbol of the string..isEmpty()
returns true
, if the string has no symbols, otherwise, it returns false
..drop(n)
removes n
first symbols from the string and returns the resulting string..reversed()
returns the reversed string..toInt()
converts the string to an integer and returns it.You should output results using the println
function.