Skip to content

Instantly share code, notes, and snippets.

Embed
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));
}
}
@ShabanKamell
Copy link
Author

ShabanKamell commented Mar 21, 2019

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

Loading

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