19#include "faker-cxx/export.h"
44 unsigned int atLeastCount{(std::numeric_limits<unsigned>::min)()};
45 unsigned int atMostCount{(std::numeric_limits<unsigned>::max)()};
114FAKER_CXX_EXPORT std::string
ulid(time_t refDate = std::time(
nullptr));
128FAKER_CXX_EXPORT std::string
sample(
unsigned length = 10);
158FAKER_CXX_EXPORT std::string
symbol(
unsigned minLength = 1,
unsigned maxLength = 10);
173FAKER_CXX_EXPORT std::string
fromCharacters(
const std::string& characters,
unsigned length = 1);
190 unsigned length = 1);
208 const std::string& excludeCharacters =
"");
245 const std::string& excludeCharacters =
"");
279FAKER_CXX_EXPORT std::string
numeric(
unsigned length = 1,
bool allowLeadingZeros =
true);
296FAKER_CXX_EXPORT std::string
numeric(
GuaranteeMap&& guarantee,
unsigned length = 1,
bool allowLeadingZeros =
true);
313FAKER_CXX_EXPORT std::string
nanoId(
int length);
347FAKER_CXX_EXPORT std::string
nanoId(
int minLength,
int maxLength);
FAKER_CXX_EXPORT std::string nanoId()
Generates a unique, URL-safe string identifier of default length.
FAKER_CXX_EXPORT std::string uuid(Uuid uuid=Uuid::V4)
Generates an Universally Unique Identifier, defaults to V4.
FAKER_CXX_EXPORT std::string symbol(unsigned minLength=1, unsigned maxLength=10)
Returns a string containing "~`!@#$%^&*()_-+={[}]|:;\"'<,>.?/".
FAKER_CXX_EXPORT std::string sample(unsigned length=10)
Returns a string containing UTF-16 chars between 33 and 125 (`!` to `}`).
StringCasing
Definition string.h:36
FAKER_CXX_EXPORT std::string generateAtLeastString(const GuaranteeMap &guarantee)
Generates the least required string for a given guarantee map.
FAKER_CXX_EXPORT std::string ulid(time_t refDate=std::time(nullptr))
Generates an Universally Unique Lexicographically Sortable Identifier.
FAKER_CXX_EXPORT std::string numeric(unsigned length=1, bool allowLeadingZeros=true)
Generates a given length string of digits.
FAKER_CXX_EXPORT std::string alphanumeric(unsigned length=1, StringCasing casing=StringCasing::Mixed, const std::string &excludeCharacters="")
Generates a string consisting of alpha characters and digits.
Uuid
Definition string.h:25
FAKER_CXX_EXPORT bool isValidGuarantee(GuaranteeMap &guarantee, std::set< char > &targetCharacters, unsigned length)
Checks if the given guarantee map is valid for given targetCharacters and length.
FAKER_CXX_EXPORT std::string alpha(unsigned length=1, StringCasing casing=StringCasing::Mixed, const std::string &excludeCharacters="")
Generates a string consisting of letters in the English alphabet.
FAKER_CXX_EXPORT std::string fromCharacters(const std::string &characters, unsigned length=1)
Generates a string consisting of given characters.
std::map< char, CharCount > GuaranteeMap
Definition string.h:48