Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#7 Daimon-scala problem, reverse case
class CaseReversibleString(s:String) {
def reverseCases = (for (c <- s.toCharArray) yield {
if (c.isUpper) c.toLower
else c.toUpper
}).mkString
}
implicit def string2CaseReversibleString(s:String) = new CaseReversibleString(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.