We Recommend

Object-Oriented Programming in Pascal: A Graphical Approach Object-Oriented Programming in Pascal: A Graphical Approach
Covers all of the essential concepts of objectoriented programming, including object re-use, inheritance, virtual methods, and polymorphisms.


Posted By

vanne on 08/20/07


Tagged

ruby


Versions (?)


Inverse a string based on a delimiter


Published in: Other 


  1. class String
  2.  
  3. # Reverses a string based on a delimiter
  4. def inverse(delim=",")
  5. self.split(",").reverse.join(", ")
  6. end
  7. end

Report this snippet 

You need to login to post a comment.