I'm making some changes to a Java Tapestry application that I didn't build. I need to use a Java class to count the number of times a line break (/r) occurs in a string. Does Tapestry have a built-in tool for doing this, or a reference guide for string functions?
I can easily replace all instances of line breaks with
textmedium.getTextcontent().replaceAll("\r", "<br>")
But I can't find a reference which would tell me what other functions I can use on textmedium.getTextcontent().
StackOverflow's favourite "count instances of x in a string using Java" answer (here: Java: How do I count the number of occurrences of a char in a String?) returns an error that there's no such thing as StringUtils, so I guess StringUtils is not a Tapestry thing, or I'm doing it wrong. Is there an equivalent I can use, or a fast way to import it?