To Examples
# Source code for TestString class.
# Test new method.
a = String.new("dog")
print a, "\n"
# Shortcut method to create a new String object.
b = "dog"
print b, "\n"
# Test delete method
s = "mississippi"
t = s.delete("i")
print t, "\n"
# Test insert method
c = "elephant"
c.insert(2, "xyz")
print c, "\n"
# Test reverse method
d = "This is a test."
e = d.reverse
print e, "\n"
# Test upcase method
f = d.upcase
print f, "\n"
# Test + (concatenation) method
g = "cat"
h = b + "abc" + g
print h, "\n"
# Test * (repeat) method
i = "dog" * 3
print i, "\n"