morse.cr
morse
Morse code encoder/decoder.
Installation
Add this to your shard.yml:
dependencies:
morse:
github: thegreyfellow/morse.cr
version: "~> 0.1.0"
Usage
# Encoding a string
to_encode = "hello world, this is me from the past."
encoded_string = Morse.encode(to_encode)
# => ".... . .−.. .−.. −−− / .−− −−− .−. .−.. −.. −−..−− / − .... .. ... / −.−− −−− ..− ... ... . ..−. / ..−. .−. −−− −− / − .... . / .−−. .− ... − .−.−.−"
# Decoding a string
to_decode = ".... . .−.. .−.. −−− / .−− −−− .−. .−.. −.. −−..−− / − .... .. ... / −.−− −−− ..− ... ... . ..−. / ..−. .−. −−− −− / − .... . / .−−. .− ... − .−.−.−"
decoded_string = Morse.decode(to_decode)
# => "hello world, this is me from the past."
Development
- git clone the repo.
- start hacking around :).
Contributing
- Fork it ( https://github.com/thegreyfellow/morse/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- thegreyfellow - creator, maintainer
Repository
morse.cr
Owner
Statistic
- 0
- 0
- 0
- 0
- 0
- almost 6 years ago
- February 12, 2018
License
MIT License
Links
Synced at
Thu, 07 Nov 2024 18:15:49 GMT
Languages