View Source Faker.Nato (Faker v0.18.0)

Functions for generating NATO alphabet data

Summary

Functions

Returns a random NATO call sign 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

Functions

@spec callsign() :: String.t()

Returns a random NATO call sign 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"
@spec 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"
@spec format(String.t()) :: String.t()

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"
@spec 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"
@spec stop_code_word() :: String.t()

Returns the NATO stop code

Examples

iex> Faker.Nato.stop_code_word()
"STOP"