# StringMagic is an implementation of Ruby's string methods in Javascript using Nila. # It extends the String prototype by adding more methods to it. # It is being written by Adhithya Rajasekaran and Sri Madhavi Rajasekaran. # It is released under the MIT License # Nila allows you to open native Classes/Prototypes and extend them with custom # methods/functions. So we will be opening the String class and adding more methods # to it. class String def endswith(suffix) # suffix can be any string self.include?(suffix,self.length-suffix.length) end end