Faker C++
|
Classes | |
struct | Currency |
Enumerations | |
enum class | CreditCardType { AmericanExpress , Discover , MasterCard , Visa } |
Functions | |
FAKER_CXX_EXPORT Currency | currency () |
Returns a random currency. | |
FAKER_CXX_EXPORT std::string_view | currencyName () |
Returns a random currency name. | |
FAKER_CXX_EXPORT std::string_view | currencyCode () |
Returns a random currency code. | |
FAKER_CXX_EXPORT std::string_view | currencySymbol () |
Returns a random currency symbol. | |
FAKER_CXX_EXPORT std::string_view | accountType () |
Returns a random account type. | |
FAKER_CXX_EXPORT std::string | amount (double min=0, double max=1000, Precision precision=Precision::TwoDp, const std::string &symbol="") |
Generates a random amount between the given bounds (inclusive). | |
FAKER_CXX_EXPORT std::string | iban (Locale locale=Locale::de_DE) |
Generates a random IBAN. | |
FAKER_CXX_EXPORT std::string_view | bic (Locale locale=Locale::en_US) |
Generates a random BIC. | |
FAKER_CXX_EXPORT std::string | accountNumber (unsigned length=8) |
Generates a random account number. | |
FAKER_CXX_EXPORT std::string | pin (unsigned length=4) |
Generates a random PIN number. | |
FAKER_CXX_EXPORT std::string | routingNumber () |
Generates a random routing number. | |
FAKER_CXX_EXPORT std::string | creditCardNumber (CreditCardType creditCardType=CreditCardType::Visa) |
Generates a random credit card number. | |
FAKER_CXX_EXPORT std::string | creditCardCvv () |
Generates a random credit card CVV. | |
FAKER_CXX_EXPORT std::string | bitcoinAddress () |
Generates a random bitcoin address. | |
FAKER_CXX_EXPORT std::string | litecoinAddress () |
Generates a random litecoin address. | |
FAKER_CXX_EXPORT std::string | ethereumAddress () |
Generates a random ethereum address. | |
FAKER_CXX_EXPORT std::string | creditCardExpirationDate () |
Generates a random expiration date. | |
FAKER_CXX_EXPORT std::string_view | creditCardType () |
Generates a random credit card type. | |
|
strong |
FAKER_CXX_EXPORT std::string faker::finance::accountNumber | ( | unsigned | length = 8 | ) |
Generates a random account number.
length | The length of the account number. Defaults to `8`. |
FAKER_CXX_EXPORT std::string_view faker::finance::accountType | ( | ) |
Returns a random account type.
FAKER_CXX_EXPORT std::string faker::finance::amount | ( | double | min = 0, |
double | max = 1000, | ||
Precision | precision = Precision::TwoDp, | ||
const std::string & | symbol = "" ) |
Generates a random amount between the given bounds (inclusive).
min | The lower bound for the amount. Defaults to `0`. |
max | The upper bound for the amount. Defaults to `1000`. |
precision | The number of decimal points of precision for the amount. Defaults to `Precision::TwoDp`. |
symbol | The symbol used to prefix the amount. Defaults to `""`. |
FAKER_CXX_EXPORT std::string_view faker::finance::bic | ( | Locale | locale = Locale::en_US | ) |
Generates a random BIC.
locale | The locale. Defaults to `Locale::en_US`. |
FAKER_CXX_EXPORT std::string faker::finance::bitcoinAddress | ( | ) |
Generates a random bitcoin address.
FAKER_CXX_EXPORT std::string faker::finance::creditCardCvv | ( | ) |
Generates a random credit card CVV.
FAKER_CXX_EXPORT std::string faker::finance::creditCardExpirationDate | ( | ) |
Generates a random expiration date.
FAKER_CXX_EXPORT std::string faker::finance::creditCardNumber | ( | CreditCardType | creditCardType = CreditCardType::Visa | ) |
Generates a random credit card number.
creditCardType | The type of the credit card. Defaults to `CreditCardTypeVisa`. |
FAKER_CXX_EXPORT std::string_view faker::finance::creditCardType | ( | ) |
Generates a random credit card type.
FAKER_CXX_EXPORT Currency faker::finance::currency | ( | ) |
FAKER_CXX_EXPORT std::string_view faker::finance::currencyCode | ( | ) |
Returns a random currency code.
FAKER_CXX_EXPORT std::string_view faker::finance::currencyName | ( | ) |
Returns a random currency name.
FAKER_CXX_EXPORT std::string_view faker::finance::currencySymbol | ( | ) |
Returns a random currency symbol.
FAKER_CXX_EXPORT std::string faker::finance::ethereumAddress | ( | ) |
Generates a random ethereum address.
FAKER_CXX_EXPORT std::string faker::finance::iban | ( | Locale | locale = Locale::de_DE | ) |
Generates a random IBAN.
locale | The locale. Defaults to `Locale::de_DE`. |
FAKER_CXX_EXPORT std::string faker::finance::litecoinAddress | ( | ) |
Generates a random litecoin address.
FAKER_CXX_EXPORT std::string faker::finance::pin | ( | unsigned | length = 4 | ) |
Generates a random PIN number.
length | The length of the PIN to generate. Defaults to `4`. |
FAKER_CXX_EXPORT std::string faker::finance::routingNumber | ( | ) |
Generates a random routing number.