Created
March 21, 2019 12:16
-
-
Save ShabanKamell/485ee375e29789ea17f15514b86b33f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use this util class to convert a non-English number to English in Android.