Convert a creditCardNumber as long to a formatted String. Currently it breaks 16-digit numbers
into groups of 4.

@param creditCardNumber number on card.

@return String representation of the credit card number.
348318
private static String toPrettyString(long creditCardNumber) {
	String plain = Long.toString(creditCardNumber);
	// int i = findMatchingRange(creditCardNumber);
	int length = plain.length();

	switch (length) {
	case 12:
	    // 12 pattern 3-3-3-3
	    return plain.substring(0, 3) + ' ' + plain.substring(3, 6) + ' ' + plain.substring(6, 9) + ' ' + plain.substring(9, 12);

	case 13:
	    // 13 pattern 4-3-3-3
	    return plain.substring(0, 4) + ' ' + plain.substring(4, 7) + ' ' + plain.substring(7, 10) + ' ' + plain.substring(10, 13);

	case 14:
	    // 14 pattern 2-4-4-4
	    return plain.substring(0, 2) + ' ' + plain.substring(2, 6) + ' ' + plain.substring(6, 10) + ' ' + plain.substring(10, 14);

	case 15:
	    // 15 pattern 3-4-4-4
	    return plain.substring(0, 3) + ' ' + plain.substring(3, 7) + ' ' + plain.substring(7, 11) + ' ' + plain.substring(11, 15);

	case 16:
	    // 16 pattern 4-4-4-4
	    return plain.substring(0, 4) + ' ' + plain.substring(4, 8) + ' ' + plain.substring(8, 12) + ' ' + plain.substring(12, 16);

	case 17:
	    // 17 pattern 1-4-4-4-4
	    return plain.substring(0, 1) + ' ' + plain.substring(1, 5) + ' ' + plain.substring(5, 9) + ' ' + plain.substring(9, 13) + ' ' + plain.substring(13, 17);

	default:
	    // 0..11, 18+ digits long
	    // plain
	    return plain;
	} // end switch
    }
114066
public String getCardNumber() {
		String ret = null;
		if (track2 != null) {
			ret = track2.getCardNumber();
		}
		if (ret == null && track1 != null) {
			ret = track1.getCardNumber();
		}
		return ret;
	}
906520
public static final long parseLong(CharSequence cs)
    {
        if (CharSequences.startsWith(cs, "0b"))
        {
            return parseLong(cs, 2, 2, cs.length());
        }
        if (CharSequences.startsWith(cs, "0x"))
        {
            return parseLong(cs, 16, 2, cs.length());
        }
        return parseLong(cs, 10);
    }
851950
public String toFString(int digits) {
        if (b.compareTo(BigInteger.ONE) != 0) {
            MathContext mc = new MathContext(digits, RoundingMode.DOWN);
            BigDecimal f = (new BigDecimal(a)).divide(new BigDecimal(b), mc);
            return (f.toString());
        } else {
            return a.toString();
        }
    }
903950
public String getNumeratorPart(final int digit) {
        
        final int length = numeratorPart.length();
        if(length < digit || digit <= 0) {
            return "";
        }
        
        return String.valueOf(numeratorPart.charAt(length - digit));
    }
749480
public static boolean isDiscover(String cc) {
        String first4digs = cc.substring(0, 4);

        if ((cc.length() == 16) && (first4digs.equals("6011")))
            return isCreditCard(cc);
        return false;
    }
377296
public static String formatNumber(Number count) {
		Format numberFormatter = getNumberFormatter(DEFAULT_NUMBER_FORMAT);
		return numberFormatter.format(count);
	}
654553
public static String captchaNumber(int length) {
        StringBuilder sb   = new StringBuilder();
        Random        rand = new Random();
        for (int i = 0; i < length; i++) {
            sb.append(rand.nextInt(10));
        }
        return sb.toString();
    }
425080
public static String toStr(Number number, String defaultValue) {
		return (null == number) ? defaultValue : toStr(number);
	}
240617
public static final Function<Long,String> toStr() {
        return (Function<Long,String>)((Function)FnNumber.toStr());
    }
505689
public function validateNumber($creditCardNumber)
    {
        if (!$this->checkType()) {
            throw new Exception(Yii::t('ECCValidator', 'The "format" property must be specified with a supported Credit Card format.'));
        }

        $creditCardNumber = preg_replace('/[ -]+/', '', $creditCardNumber);

        return $this->checkFormat($creditCardNumber) && $this->mod10($creditCardNumber);
    }
789960
public boolean validateCardNumber() {
        boolean cardNumberIsValid =
                CardUtils.isValidCardNumber(mCardNumberEditText.getCardNumber());
        mCardNumberEditText.setShouldShowError(!cardNumberIsValid);
        return cardNumberIsValid;
    }
367657
public String encode(long... numbers) {
        if (numbers.length == 0) {
            return "";
        }

        for (final long number : numbers) {
            if (number < 0) {
                return "";
            }
            if (number > MAX_NUMBER) {
                throw new IllegalArgumentException("number can not be greater than " + MAX_NUMBER + "L");
            }
        }
        return this._encode(numbers);
    }
764253
protected function checkFormat($cardNumber)
    {
        return preg_match('/^[0-9]+$/', $cardNumber) && preg_match($this->patterns[$this->format], $cardNumber);
    }
499971
public String encode(long... numbers){
    String retval = "";
    if(numbers.length == 0) {
      return retval;
    }

    return this._encode(numbers);
  }
873178
public static final Function<BigDecimal,String> toStr() {
	    return (Function<BigDecimal,String>)((Function)FnNumber.toStr());
    }
2928
public Card bankCode(final Integer bankCode) {
        if (bankCode == null) {
            this.bankCode = null;
        } else {
            this.bankCode = String.format("%03d", bankCode);
        }
        return this;
    }