Ad
  • Custom User Avatar

    I won't elaborate. This is just clearly in the description. So read it again, or move on.

  • Default User Avatar

    I've read the description, please elaboraate what is there that you think I've missed from the description.

  • Custom User Avatar

    Is this what you need?

    val MorseCode = mapOf(
        "-.-.--" to "!",
        ".-..-." to "\"",
        "...-..-" to "$",
        ".-..." to "&",
        ".----." to "\'",
        "-.--." to "(",
        "-.--.-" to ")",
        ".-.-." to "+",
        "--..--" to ",",
        "-....-" to "-",
        ".-.-.-" to ".",
        "-..-." to "/",
        "-----" to "0",
        ".----" to "1",
        "..---" to "2",
        "...--" to "3",
        "....-" to "4",
        "....." to "5",
        "-...." to "6",
        "--..." to "7",
        "---.." to "8",
        "----." to "9",
        "---..." to ":",
        "-.-.-." to ";",
        "-...-" to "=",
        "..--.." to "?",
        ".--.-." to "@",
        ".-" to "A",
        "-..." to "B",
        "-.-." to "C",
        "-.." to "D",
        "." to "E",
        "..-." to "F",
        "--." to "G",
        "...." to "H",
        ".." to "I",
        ".---" to "J",
        "-.-" to "K",
        ".-.." to "L",
        "--" to "M",
        "-." to "N",
        "---" to "O",
        ".--." to "P",
        "--.-" to "Q",
        ".-." to "R",
        "..." to "S",
        "-" to "T",
        "..-" to "U",
        "...-" to "V",
        ".--" to "W",
        "-..-" to "X",
        "-.--" to "Y",
        "--.." to "Z",
        "..--.-" to "_",
        "...---..." to "SOS"
    )
    
  • Custom User Avatar

    Then try printing MorseCode here and build your own in your IDE with that.

  • Custom User Avatar

    I solve everything with the IDE and then copy it here. That's why I don't understand how to do it.

  • Custom User Avatar

    Kotlin: MorseCode[".--"] ?: "" or MorseCode.getOrDefault(".--", "")

    Change that ".--" with a var that contains a single morse code.

  • Custom User Avatar

    How to add morse code to kotlin. I don't understand...