Skip to content

Instantly share code, notes, and snippets.

@imphasing
Created December 15, 2011 18:12
Show Gist options
  • Save imphasing/1482150 to your computer and use it in GitHub Desktop.
Save imphasing/1482150 to your computer and use it in GitHub Desktop.
def get_suffixes(str)
suffixes = Array.new(str.length) {|i| str[str.length - 1 - i, i + 1]}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment