Faker v0.12.0 Faker.Nato View Source
Functions for generating NATO alphabet data
Link to this section Summary
Functions
Returns a random NATO callsign of the form [alpha]-[alpha]-[digit]
Returns a random digit NATO code
Formats a string using the NATO alphabet.
Returns a random letter NATO code
Returns the NATO stop code
Link to this section Functions
Link to this function
callsign()
View Source
callsign()
View Source
callsign() :: String.t()
callsign() :: String.t()
Returns a random NATO callsign of the form [alpha]-[alpha]-[digit]
Examples
iex> Faker.Nato.callsign()
"ECHO-LIMA-SIX"
iex> Faker.Nato.callsign()
"CHARLIE-ECHO-SEVEN"
iex> Faker.Nato.callsign()
"SIERRA-GOLF-TWO"
iex> Faker.Nato.callsign()
"INDIA-WHISKEY-FOUR"
Link to this function
digit_code_word()
View Source
digit_code_word()
View Source
digit_code_word() :: String.t()
digit_code_word() :: String.t()
Returns a random digit NATO code
Examples
iex> Faker.Nato.digit_code_word()
"ONE"
iex> Faker.Nato.digit_code_word()
"TWO"
iex> Faker.Nato.digit_code_word()
"SIX"
iex> Faker.Nato.digit_code_word()
"FIVE"
Link to this function
format(str) View Source
Formats a string using the NATO alphabet.
It replaces "#"
to a random NATO digit, "?"
to random NATO letter
and "."
to the stop code.
Examples
iex> Faker.Nato.format("#-?-#-.")
"ONE-LIMA-SIX-STOP"
iex> Faker.Nato.format("#-?-#-.")
"FIVE-ECHO-SEVEN-STOP"
iex> Faker.Nato.format("#-?-#-.")
"FIVE-GOLF-TWO-STOP"
iex> Faker.Nato.format("#-?-#-.")
"ONE-WHISKEY-FOUR-STOP"
iex> Faker.Nato.format("? Team")
"SIERRA Team"
iex> Faker.Nato.format("hey")
"hey"
iex> Faker.Nato.format(". it")
"STOP it"
Link to this function
letter_code_word()
View Source
letter_code_word()
View Source
letter_code_word() :: String.t()
letter_code_word() :: String.t()
Returns a random letter NATO code
Examples
iex> Faker.Nato.letter_code_word()
"ECHO"
iex> Faker.Nato.letter_code_word()
"LIMA"
iex> Faker.Nato.letter_code_word()
"ROMEO"
iex> Faker.Nato.letter_code_word()
"CHARLIE"
Link to this function
stop_code_word()
View Source
stop_code_word()
View Source
stop_code_word() :: String.t()
stop_code_word() :: String.t()
Returns the NATO stop code
Examples
iex> Faker.Nato.stop_code_word()
"STOP"