Back to project page smsAndCallFilter.
The source code is released under:
/* * Author: Hasib Al Muhaimin. * * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the L...
If you think the Android project smsAndCallFilter listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Author: Hasib Al Muhaimin./* w ww .j ava 2s . c o m*/ * * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * */ package com.sadakhata.banglatoenglishrupantor; public class Rupantor{ public static String convert(String str) { String find[] = {"?", "?", "?", "?", "?", "?", "?", "??", "??", "?", "?"}; String replace[] = {"o", "a", "i", "i", "u", "u", "rri","e", "oi", "o", "ou"}; for(int i=0; i<find.length; i++) { str = str.replace(find[i], replace[i]); } find = new String[]{"?", "?", "?", "??", "?", "?", "?", "?", "?", "?"}; replace = new String[]{"a", "i", "i", "u", "u", "rri", "e", "oi", "o", "ou"}; for(int i=0; i<find.length; i++) { str = str.replace(find[i], replace[i]); } find = new String[]{"?", "?", "?", "?", "?", "?", "?", "?", "??", "?", "?", "?", "?", "?","?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "??", "?", "?", "?", "??"}; replace = new String[]{"k", "kh", "g", "gh", "ng", "c", "ch", "j", "jh", "ng", "t", "th", "d", "dh", "n", "t", "th", "d", "dh", "n", "p", "f", "b", "v", "m", "j", "r", "l", "sh", "s", "s", "h", "r", "rh", "y", "ng", ":", ""}; for(int i=0; i<find.length; i++) { str = str.replace(find[i], replace[i]); } find = new String[]{"??", "??", "??", "??"}; replace = new String[]{"r", "r", "rh", "y"}; for(int i=0; i<find.length; i++) { str = str.replace(find[i], replace[i]); } find = new String[]{"??"}; replace = new String[]{""}; for(int i=0; i<find.length; i++) { str = str.replace(find[i], replace[i]); } return str; } }