Created
July 2, 2018 13:23
-
-
Save shikto1/556b7463c56a6a78636f34b0388fb548 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
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