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_num: option.Option(String),
  )
}

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_num: option.Option(String),
    )
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_num: option.Option(String),
  )
}

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_num: option.Option(String),
    )
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_is_uppercase: Bool
pub const default_language_num: String
pub const default_separator: String
pub const default_space: String
pub const default_to_uppercase: Bool
pub const language_num_arabic: String
pub const language_num_cyrillic: String
pub const language_num_greek: String
pub const language_num_hebrew: String
pub const language_num_japanese: String
pub const language_num_korean: String
pub const language_num_latin: String
pub const language_num_latin_extended: String
pub const language_num_numbers: String
pub const language_num_persian: String
pub const language_num_punctuation: String
pub const language_num_thai: String
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
Search Document