StringFunctions { public static Function<String,String> prepend(final String prefix) { return new PrependFunction(checkNotNull(prefix, "prefix")); }  static Function<String,String> append(final String suffix); static Function<String,String> prepend(final String prefix); static Function<Object, String> formatter(final String pattern); static Function<Object[], String> formatterForArray(final String pattern); static Function<Iterable<?>, String> formatterForIterable(final String pattern); static Function<Iterable<?>, String> joiner(final String separator); static Function<Object[], String> joinerForArray(final String separator); static Function<Object,String> toStringFunction(); static Function<String,Integer> length(); static Function<String,String> surround(final String prefix, final String suffix); static Function<String, String> trim(); static Function<String, String> trimEnd(); static Function<String, String> toLowerCase(); static Function<String, String> toUpperCase(); static Function<String, String> convertCase(final CaseFormat src, final CaseFormat target);  }
@Test public static void testPrepend() { Assert.assertEquals(StringFunctions.prepend("Hello ").apply("World"), "Hello World"); }