@Test public void snakeCase() { assertEquals("foo_bar", SnakeCase.snakeCase("Foo Bar")); assertEquals("foo_bar", SnakeCase.snakeCase("fooBar")); assertEquals("foo_bar", SnakeCase.snakeCase("--foo-bar")); assertEquals("", SnakeCase.snakeCase(null)); assertEquals("a", SnakeCase.snakeCase("\u00c0")); }
public static String snakeCase(final String string) { return createCompounder(new Function3<String, String, Integer, String>() { public String apply(final String result, final String word, final Integer index) { return result + (index > 0 ? "_" : "") + word.toLowerCase(Locale.getDefault()); } }).apply(string); }
SnakeCase { public static String snakeCase(final String string) { return createCompounder(new Function3<String, String, Integer, String>() { public String apply(final String result, final String word, final Integer index) { return result + (index > 0 ? "_" : "") + word.toLowerCase(Locale.getDefault()); } }).apply(string); } }
SnakeCase { public static String snakeCase(final String string) { return createCompounder(new Function3<String, String, Integer, String>() { public String apply(final String result, final String word, final Integer index) { return result + (index > 0 ? "_" : "") + word.toLowerCase(Locale.getDefault()); } }).apply(string); }  }
SnakeCase { public static String snakeCase(final String string) { return createCompounder(new Function3<String, String, Integer, String>() { public String apply(final String result, final String word, final Integer index) { return result + (index > 0 ? "_" : "") + word.toLowerCase(Locale.getDefault()); } }).apply(string); }  static String deburr(final String string); static List<String> words(final String string); static String snakeCase(final String string); }
SnakeCase { public static String snakeCase(final String string) { return createCompounder(new Function3<String, String, Integer, String>() { public String apply(final String result, final String word, final Integer index) { return result + (index > 0 ? "_" : "") + word.toLowerCase(Locale.getDefault()); } }).apply(string); }  static String deburr(final String string); static List<String> words(final String string); static String snakeCase(final String string);  }