morse_code_translator
Types
pub type ConvertOptions {
ConvertOptions(
input_dot: String,
output_dot: String,
input_dash: String,
output_dash: String,
input_space: String,
output_space: String,
input_separator: String,
output_separator: String,
)
}
Constructors
-
ConvertOptions( input_dot: String, output_dot: String, input_dash: String, output_dash: String, input_space: String, output_space: String, input_separator: String, output_separator: String, )
pub type DecodeOptions {
DecodeOptions(
input_dot: option.Option(String),
input_dash: option.Option(String),
input_space: option.Option(String),
input_separator: option.Option(String),
to_uppercase: option.Option(Bool),
language: option.Option(Language),
)
}
Constructors
-
DecodeOptions( input_dot: option.Option(String), input_dash: option.Option(String), input_space: option.Option(String), input_separator: option.Option(String), to_uppercase: option.Option(Bool), language: option.Option(Language), )
pub type EncodeOptions {
EncodeOptions(
output_dot: option.Option(String),
output_dash: option.Option(String),
output_space: option.Option(String),
output_separator: option.Option(String),
is_uppercase: option.Option(Bool),
language: option.Option(Language),
)
}
Constructors
-
EncodeOptions( output_dot: option.Option(String), output_dash: option.Option(String), output_space: option.Option(String), output_separator: option.Option(String), is_uppercase: option.Option(Bool), language: option.Option(Language), )
pub type MorseCodeError {
MorseCodeError(msg: String)
}
Constructors
-
MorseCodeError(msg: String)
pub type MorseCodeList =
List(#(String, String, List(Bool)))
Constants
pub const default_dash: String
pub const default_dot: String
pub const default_separator: String
pub const default_space: String
pub const language_latin_extended: Language
Latin Extended (Turkish, Polish etc.)
pub const morse_code_list: List(#(String, String, List(Bool)))
Functions
pub fn convert(
input: String,
options: ConvertOptions,
) -> Result(String, MorseCodeError)
pub fn convert_to_string(
input: String,
options: ConvertOptions,
) -> String
pub fn decode(
input: String,
options: DecodeOptions,
morse_code_dict: Option(List(#(String, String, List(Bool)))),
) -> Result(String, MorseCodeError)
pub fn decode_to_string(
input: String,
options: DecodeOptions,
morse_code_dict: Option(List(#(String, String, List(Bool)))),
) -> String
pub fn encode(
input: String,
options: EncodeOptions,
morse_code_dict: Option(List(#(String, String, List(Bool)))),
) -> Result(String, MorseCodeError)
pub fn encode_to_string(
input: String,
options: EncodeOptions,
morse_code_dict: Option(List(#(String, String, List(Bool)))),
) -> String