Skip to content

mate-academy/kt-companion-object

Repository files navigation

Remove Letters

Our friend can't stand the r letter (no joke). Can you help him get rid of them in the text?

Create the companion object with removeLetter() function. It should accept the String input variable and return an array of characters. In the array, all letters have to be lowercase, and all r characters must be replaced with !.

💡 Make sure to treat the removeLetter() method as a static method in Java code!

For instance:

//input example
val input = "Remove Letters"

//result example
['!', 'e', 'm', 'o', 'v', 'e', ' ', 'l', 'e', 't', 't', 'e', '! ', 's']

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published