Faker C++
|
Functions | |
FAKER_CXX_EXPORT std::string_view | sample (std::optional< unsigned > length=std::nullopt, Locale locale=Locale::en_US) |
Returns a random . | |
FAKER_CXX_EXPORT std::string | words (unsigned numberOfWords=1, Locale locale=Locale::en_US) |
Returns a string containing a number of space separated random words. | |
FAKER_CXX_EXPORT std::string_view | adjective (std::optional< unsigned > length=std::nullopt, Locale locale=Locale::en_US) |
Returns a random adjective. | |
FAKER_CXX_EXPORT std::string_view | adjectiveLocale (unsigned length=0, Locale locale=Locale::en_US) |
Returns a random adjective, using locale. | |
FAKER_CXX_EXPORT std::string_view | adverb (std::optional< unsigned > length=std::nullopt, Locale locale=Locale::en_US) |
Returns a random adverb. | |
FAKER_CXX_EXPORT std::string_view | conjunction (std::optional< unsigned > length=std::nullopt, Locale locale=Locale::en_US) |
Returns a random conjunction. | |
FAKER_CXX_EXPORT std::string_view | interjection (std::optional< unsigned > length=std::nullopt, Locale locale=Locale::en_US) |
Returns a random interjection. | |
FAKER_CXX_EXPORT std::string_view | noun (std::optional< unsigned > length=std::nullopt, Locale locale=Locale::en_US) |
Returns a random noun. | |
FAKER_CXX_EXPORT std::string_view | preposition (std::optional< unsigned > length=std::nullopt, Locale locale=Locale::en_US) |
Returns a random preposition. | |
FAKER_CXX_EXPORT std::string_view | verb (std::optional< unsigned > length=std::nullopt, Locale locale=Locale::en_US) |
Returns a random verb. | |
FAKER_CXX_EXPORT std::string_view faker::word::adjective | ( | std::optional< unsigned > | length = std::nullopt, |
Locale | locale = Locale::en_US ) |
Returns a random adjective.
length | The expected length of the word. If no adjective with given length will be found or length is 0, it will return a random size adjective. |
locale | The locale. Defaults to `Locale::en_US`. |
FAKER_CXX_EXPORT std::string_view faker::word::adjectiveLocale | ( | unsigned | length = 0, |
Locale | locale = Locale::en_US ) |
Returns a random adjective, using locale.
length | The expected length of the word. If no adjective with given length will be found or length is 0, it will return a random size adjective. |
locale | The locale. Defaults to `Locale::en_US`. |
FAKER_CXX_EXPORT std::string_view faker::word::adverb | ( | std::optional< unsigned > | length = std::nullopt, |
Locale | locale = Locale::en_US ) |
Returns a random adverb.
length | The expected length of the word. If no adverb with given length will be found or length is 0, it will return a random size adverb. |
locale | The locale. Defaults to `Locale::en_US`. |
FAKER_CXX_EXPORT std::string_view faker::word::conjunction | ( | std::optional< unsigned > | length = std::nullopt, |
Locale | locale = Locale::en_US ) |
Returns a random conjunction.
length | The expected length of the word. If no conjunction with given length will be found or length is 0, it will return a random size conjunction. |
locale | The locale. Defaults to `Locale::en_US`. |
FAKER_CXX_EXPORT std::string_view faker::word::interjection | ( | std::optional< unsigned > | length = std::nullopt, |
Locale | locale = Locale::en_US ) |
Returns a random interjection.
length | The expected length of the word. If no interjection with given length is found or length is 0, it will return a random size interjection. |
locale | The locale. Defaults to `Locale::en_US`. |
FAKER_CXX_EXPORT std::string_view faker::word::noun | ( | std::optional< unsigned > | length = std::nullopt, |
Locale | locale = Locale::en_US ) |
Returns a random noun.
length | The expected length of the word. If no noun with given length is found or length is 0, it will return a random size noun. |
locale | The locale. Defaults to `Locale::en_US`. |
FAKER_CXX_EXPORT std::string_view faker::word::preposition | ( | std::optional< unsigned > | length = std::nullopt, |
Locale | locale = Locale::en_US ) |
Returns a random preposition.
length | The expected length of the word. If no preposition with given length is found or length is 0, it will return a random size preposition. |
locale | The locale. Defaults to `Locale::en_US`. |
FAKER_CXX_EXPORT std::string_view faker::word::sample | ( | std::optional< unsigned > | length = std::nullopt, |
Locale | locale = Locale::en_US ) |
Returns a random .
length | The expected length of the . If no word with given length will be found or length is 0, it will return a random size word. |
locale | The locale. Defaults to `Locale::en_US`. |
FAKER_CXX_EXPORT std::string_view faker::word::verb | ( | std::optional< unsigned > | length = std::nullopt, |
Locale | locale = Locale::en_US ) |
Returns a random verb.
length | The expected length of the word. If no verb with given length is found or length is 0, it will return a random size verb. |
locale | The locale. Defaults to `Locale::en_US`. |
FAKER_CXX_EXPORT std::string faker::word::words | ( | unsigned | numberOfWords = 1, |
Locale | locale = Locale::en_US ) |
Returns a string containing a number of space separated random words.
numberOfWords | The number of words to generate. |
locale | The locale. Defaults to `Locale::en_US`. |