Created
January 23, 2019 18:41
-
-
Save shishirthedev/90ddab91e9066215ba7e9555835c2a91 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public String getInBangla(String string){ | |
Character bangla_number[]={'১','২','৩','৪','৫','৬','৭','৮','৯','০'}; | |
Character eng_number[]={'1','2','3','4','5','6','7','8','9','0'}; | |
String values = ""; | |
char[] character = string.toCharArray(); | |
for (int i=0; i<character.length ; i++) { | |
Character c = ' '; | |
for (int j = 0; j < eng_number.length; j++) { | |
if(character[i]==eng_number[j]) | |
{ | |
c=bangla_number[j]; | |
break; | |
}else { | |
c=character[i]; | |
} | |
} | |
values=values+c; | |
} | |
return values; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment