To download the latest version of Commons Lang, refer to the steps outlined in Recipe 1.1.
This chapter focuses on a very small subset of the Commons Lang
project—StringUtils
and WordUtils
. To use either StringUtils
or WordUtils
in a Java class, add the following
lines to your import statements:
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.WordUtils;
Recipes that use StringUtils
and WordUtils
in this chapter will
omit these import statements in code fragments. When StringUtils
or WordUtils
appears in an example, assume that
it has already been imported.