class SearchUtil {

    public static String longToVal(final String value, final int scale) {
        try {
            final BigDecimal decimal = new BigDecimal(value);
            return decimal.movePointLeft(scale).stripTrailingZeros().toPlainString();
        } catch (Exception exp) {
            // NaN
        }
        return "0";
    }

}