fluency03
fluency03

Reputation: 2697

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

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?

Upvotes: 16

Views: 16834

Answers (2)

TapakSakti
TapakSakti

Reputation: 21

Text utils in commons-lang3 are marked with deprecation and the Javadoc points to commons-text

Upvotes: 2

OneCricketeer
OneCricketeer

Reputation: 191728

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

Upvotes: 6

Related Questions