public static String chainedFormat(String str, String[] formats)
    {
        // chained formatting
        String formatted = str;
        for (String f : formats)
            formatted = format(formatted, f);

        return formatted;
    }
Formats the string n times.
<p>

<pre>
For example:
input = "some_foo"
formatters = ["PCS", "UPPER"]

Output:
1st pass: "Some Foo"
2nd pass: "SOME FOO"
</pre>
protostuff-compiler/src/main/java/io/protostuff/compiler/STCodeGenerator.java