Skip to content

Instantly share code, notes, and snippets.

@mikedao
Created February 2, 2016 17:13
Show Gist options
  • Save mikedao/370073d7cd176f3bcf9d to your computer and use it in GitHub Desktop.
Save mikedao/370073d7cd176f3bcf9d to your computer and use it in GitHub Desktop.
string = "Denver"
puts "#{string[0]}#{string.length - 2}#{string[-1]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment