[ create a new paste ] login | about

Link: http://codepad.org/ZQszPEYB    [ raw code | output | fork ]

Ruby, pasted on Aug 20:
1
2
3
4
5
6
7
8
9
str = "AbcEdfGhi"
b=""
"CamelCase".split('').each{|i|
  if i.downcase!
    b += "_"
  end
  b += i
}
p b


Output:
1
"_camel_case"


Create a new paste based on this one


Comments: