28FAKER_CXX_EXPORT std::string_view
sample(std::optional<unsigned> length = std::nullopt, Locale locale = Locale::en_US);
43FAKER_CXX_EXPORT std::string
words(
unsigned numberOfWords = 1, Locale locale = Locale::en_US);
59FAKER_CXX_EXPORT std::string_view
adjective(std::optional<unsigned> length = std::nullopt,
60 Locale locale = Locale::en_US);
76FAKER_CXX_EXPORT std::string_view
adjectiveLocale(
unsigned length = 0, Locale locale = Locale::en_US);
92FAKER_CXX_EXPORT std::string_view
adverb(std::optional<unsigned> length = std::nullopt, Locale locale = Locale::en_US);
108FAKER_CXX_EXPORT std::string_view
conjunction(std::optional<unsigned> length = std::nullopt,
109 Locale locale = Locale::en_US);
125FAKER_CXX_EXPORT std::string_view
interjection(std::optional<unsigned> length = std::nullopt,
126 Locale locale = Locale::en_US);
142FAKER_CXX_EXPORT std::string_view
noun(std::optional<unsigned> length = std::nullopt, Locale locale = Locale::en_US);
158FAKER_CXX_EXPORT std::string_view
preposition(std::optional<unsigned> length = std::nullopt,
159 Locale locale = Locale::en_US);
175FAKER_CXX_EXPORT std::string_view
verb(std::optional<unsigned> length = std::nullopt, Locale locale = Locale::en_US);
191template <std::ranges::range Range>
199 size_t length_64 = *length;
200 auto start = range.begin();
201 auto end = range.end();
203 auto lower_it = ::std::lower_bound(start, end, length_64,
204 [](
const auto& lhs,
const auto& value) {
return lhs.size() < value; });
211 if (lower_it->size() != length)
216 auto upper_it = lower_it;
218 for (; upper_it != end; upper_it++)
220 if (upper_it->size() != lower_it->size())
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 adjectiveLocale(unsigned length=0, Locale locale=Locale::en_US)
Returns a random adjective, using locale.