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 abstract class Mask { | |
public static String unmask(String s) { | |
return s.replaceAll("[.]", "") | |
.replaceAll("[-]", "") | |
.replaceAll("[/]", "") | |
.replaceAll("[(]", "") | |
.replaceAll("[)]", ""); | |
} |
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 class Currency { | |
public static String toString(double value) { | |
DecimalFormat formatter = (DecimalFormat) NumberFormat.getCurrencyInstance(); | |
DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); | |
symbols.setCurrencySymbol(""); | |
formatter.setDecimalFormatSymbols(symbols); | |
return formatter.format(value); | |
} | |
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
import android.content.ContentValues; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.database.DatabaseUtils; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.database.sqlite.SQLiteOpenHelper; | |
import java.util.ArrayList; | |
public class DB extends SQLiteOpenHelper { |