Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import android.text.TextUtils;
import java.util.Locale;
public class DigitUtil {
public static String toEn(String value){
if (!TextUtils.isDigitsOnly(value))
return value;
return String.format(Locale.US, "%d", Long.valueOf(value));
Copy link

ShabanKamell commented Mar 21, 2019

You can use this util class to convert a non-English number to English in Android.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment