Sha256: 90b16571252e90532a1701bc237dd925f61286c632706cf7d853303678aa1fc2

Contents?: true

Size: 567 Bytes

Versions: 3

Compression:

Stored size: 567 Bytes

Contents

# 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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nilac-0.0.4.3.9.5 examples/StringMagic.nila
nilac-0.0.4.3.9.4 examples/StringMagic.nila
nilac-0.0.4.3.9.3 examples/StringMagic.nila