Aug. 10th, 2022

juan_gandhi: (Default)
def camel(s: String, i: Int = 0, state: Int = 0): String = {
if (i >= s.length) "" else {
val c = s.charAt(i)
c match {
case '_' => camel(s, i+1, (state + 1) & 2)
case _ => (if (state == 2) c.toUpper else c) + camel(s, i+1, 1)
}
}
}

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

September 2025

S M T W T F S
 1 23456
78910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 6th, 2025 03:15 pm
Powered by Dreamwidth Studios