Camel case and snake case: Difference between revisions
Content added Content deleted
(New post.) |
m (Adjusting formatting.) |
||
Line 636: | Line 636: | ||
"ergo rE tHis", "hurry-up-joe!", "c://my-docs/happy_Flag-Day/12.doc", " spaces "); |
"ergo rE tHis", "hurry-up-joe!", "c://my-docs/happy_Flag-Day/12.doc", " spaces "); |
||
System.out.println(" |
System.out.println(String.format("%48s", "=== To snake_case ===")); |
||
for ( String text : variableNames ) { |
for ( String text : variableNames ) { |
||
System.out.println(String.format("%34s%s%s", text, " --> ", toSnakeCase(text))); |
System.out.println(String.format("%34s%s%s", text, " --> ", toSnakeCase(text))); |
||
Line 642: | Line 642: | ||
System.out.println(); |
System.out.println(); |
||
System.out.println(" |
System.out.println(String.format("%48s", "=== To camelCase ===")); |
||
for ( String text : variableNames ) { |
for ( String text : variableNames ) { |
||
System.out.println(String.format("%34s%s%s", text, " --> ", toCamelCase(text))); |
System.out.println(String.format("%34s%s%s", text, " --> ", toCamelCase(text))); |
||
Line 706: | Line 706: | ||
spaces --> spaces |
spaces --> spaces |
||
=== To |
=== To camelCase === |
||
snakeCase --> snakeCase |
snakeCase --> snakeCase |
||
snake_case --> snakeCase |
snake_case --> snakeCase |