Skip to content

Instantly share code, notes, and snippets.

@shikto1
Created July 2, 2018 13:23
Show Gist options
  • Save shikto1/556b7463c56a6a78636f34b0388fb548 to your computer and use it in GitHub Desktop.
Save shikto1/556b7463c56a6a78636f34b0388fb548 to your computer and use it in GitHub Desktop.
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