user940016 user940016 - 7 months ago 24
Android Question

Android TextUtils

I can see that the TextUtils class has many functions that are identical in their purpose to functions found in the standard Java String class, such as indexOf. I'm wondering if they are aimed to just add more options to the developer, without any relation to the Android environment, such as calling indexOf on a CharSequence and not only on a String, or if they are supposed to actually replace the original functions due to issues they have when being used on Android.
Can someone please answer this informative question?


I think that TextUtils is just a collection of useful methods and are not meant to replace methods from string class, just some methods from string and other methods which make your code smaller (see TextUtils.isEmpty() and TextUtils.concat())