View Source Faker.EnGB.PhoneNumber (faker v0.2.0)
Link to this section Summary
Functions
Replaces * signs with random numbers and letters and special characters
Replaces hash signs ('#') and question marks ('?') with random numbers and letters An asterisk ('*') is replaced with either a random number or a random letter
Converts Decimal to Hex
Returns random phone_number
Convert Hex back to decimal
- International Mobile Equipment Identity (IMEI) *
- @see http://en.wikipedia.org/wiki/International_Mobile_Station_Equipment_Identity
- @see http://imei-number.com/imei-validation-check/ *
- @example "720084494799532" *
- @return int imei
Validate if a string is a vowel or not
Validate if a string is a vowel or not
Replaces all question mark ('?') occurrences with a random letter.
Returns random phone_number
Generates a random integer between two numbers.
Replaces all hash sign ('#') occurrences with a random number Replaces all percentage sign ('%') occurrences with a non-zero number.
Replaces tokens ('{{ tokenName }}') with the result from the token method call
Returns a random ascii code
Generates a random digit between 0 and 9.
Generates a random digit between 0 and 9 except passed parameter.
Generates a random digit between 0 and 9 except passed parameter.
Picks a random element from a list
Generates a random float number between two numbers.
Returns a random letter from a to z
Generates largest possible random value
Returns a shuffled version of the argument. This function accepts either an List, or a string.
Exchange two number positions
Converts string to lowercase
Converts string to lowercase
Link to this section Functions
Replaces * signs with random numbers and letters and special characters
Returns String
examples
Examples:
iex> Faker.Core.Helper.asciify("**")
"s5'G!uC3"
Replaces hash signs ('#') and question marks ('?') with random numbers and letters An asterisk ('*') is replaced with either a random number or a random letter
Returns String
examples
Examples
iex> Core.Helper.numerify(### #### ##) "soi styz mn"
Converts Decimal to Hex
Returns random phone_number
Example: +11134567890
Convert Hex back to decimal
- International Mobile Equipment Identity (IMEI) *
- @see http://en.wikipedia.org/wiki/International_Mobile_Station_Equipment_Identity
- @see http://imei-number.com/imei-validation-check/ *
- @example "720084494799532" *
- @return int imei
Validate if a string is a vowel or not
Returns boolean
examples
Examples
iex> Faker.Core.is_not_vowerl("k")
false
Validate if a string is a vowel or not
Returns boolean
examples
Examples
iex> Faker.Core.is_vowerl("a")
true
Replaces all question mark ('?') occurrences with a random letter.
Returns String
examples
Examples
iex> Core.Helper.numerify(### #### ??) "soi styz mn"
Returns random phone_number
Example: "555-123-546"
Generates a random integer between two numbers.
Returns Integer
.
examples
Examples
iex> Faker.Core.number_between(7, 392)
75
Replaces all hash sign ('#') occurrences with a random number Replaces all percentage sign ('%') occurrences with a non-zero number.
Returns String
examples
Examples
iex> Core.Helper.numerify(### #### ##) "757 7239 65"
Replaces tokens ('{{ tokenName }}') with the result from the token method call
Returns String
examples
Examples
iex> Faker.Core.parse("{{first_name}}.{{last_name}}")
???????.??????
Returns a random ascii code
Returns String
examples
Examples
iex> Faker.Core.random_ascii
"!"
Generates a random digit between 0 and 9.
Returns Integer
.
examples
Examples
iex> Faker.Core.random_digit()
3
Generates a random digit between 0 and 9 except passed parameter.
Returns Integer
.
examples
Examples
iex> Faker.Core.random_digit_not(7)
3
Generates a random digit between 0 and 9 except passed parameter.
Returns Integer
.
examples
Examples
iex> Faker.Core.random_digit_not_zero(7)
3
Picks a random element from a list
examples
Examples:
iex> Faker.Core.Helper.random_elements([32, 4, 7, 8])
32
random_float(maximum_decimals \\ 6, min_number \\ 0, max_number \\ 9)
View SourceGenerates a random float number between two numbers.
Returns Float
.
examples
Examples
iex> Faker.Core.random_float()
87.3
Returns a random letter from a to z
Returns String
examples
Examples
iex> Faker.Core.random_letter
"a"
Generates largest possible random value
Returns a shuffled version of the argument. This function accepts either an List, or a string.
example
Example:
iex> Faker.Core.shuffle("kamaro")
Exchange two number positions
Returns Struct
examples
Examples
iex> Faker.Core.swap(element_1, element_2)
{element_two, element_one}
Converts string to lowercase
Returns String
examples
Examples:
iex> Faker.Core.Helper.to_lower("KAMARO")
"kamaro"
Converts string to lowercase
Returns String
examples
Examples:
iex> Faker.Core.Helper.to_upper("kamaro")
"KAMARO"