What is the difference between Apache Commons Lang3 vs Apache Commons Text?

fluency03 picture fluency03 · Oct 23, 2017 · Viewed 9.2k times · Source

I am wondering what is the difference between Apache Commons Lang3 (org.apache.commons.lang3) vs Apache Commons Text (org.apache.commons.text)?

I saw many similarities between them.
For intance, they both have StringEscapeUtils:

But I also saw many differences.
So which one should I use, Lang3 or Text?
Or what are the common use cases for each of these two?

Answer

OneCricketeer picture OneCricketeer · Oct 23, 2017

Well, the text method states

This code has been adapted from Apache Commons Lang 3.5.

Looks like they simply plan on moving the method from one library to the other. You'd have to get the authors of that code to explain why.

However, worth pointing out that lang3 is a compile dependency of text, therefore if you included text, you would have lang3 anyway

https://github.com/apache/commons-text/blob/master/pom.xml#L61-L65