Skip to content

alfianyusufabdullah/IndonesianCurrency

Repository files navigation

Indonesia Currency Converter

Add Dependencies

  1. Add it in your root build.gradle at the end of repositories:
repositories {
 ...
  maven { url 'https://jitpack.io' }
}
  1. on module app build.gradle
implementation 'com.github.alfianyusufabdullah:IndonesianCurrency:0.0.1'

How To Use

/// 1.000.000
double amount = ...
String result = new IndonesianCurrency(amount).parse();
///Rp. 1.000.000
double amount = ...
String result = new IndonesianCurrency(amount).withRP(true).parse();
///IDR 1.000.000
double amount = ...
String result = new IndonesianCurrency(amount).withIDR(true).parse();
///Rp. 1 Juta
double amount = ...
String result = new IndonesianCurrency(amount).withRP(true).wrap().parse();
///IDR 1 Juta
double amount = ...
String result = new IndonesianCurrency(amount).withIDR(true).wrap().parse();
///1 Juta
double amount = ...
String result = new IndonesianCurrency(amount).wrap().parse();

Sample Preview