10

Pirate speak one-liner

text.replace(/[bcdfghjklmnpqrstvzx]/ig, letter => `${letter}o${letter.toLowerCase()}`)

Comments
  • 4
    "Hey, testing this! :D".replace(/[bcdfghjklmnpqrstvzx]/ig, letter => `${letter}o${letter.toLowerCase()}`)

    -> "Hohey, totesostotinongog tothohisos! :Dod"

    I would say drunk pirate speak one-liner
  • 1
    @Phlisg Haha, it's the Swedish version, Rövarspråket. Don't know if it works any different in other languages 😅
  • 9
    @ScriptCoded

    // Todo: add localisation support

    Hahaha
  • 2
    It works for Hohey!
Add Comment