core :: Buffer :: upper
self
var b = new Buffer b.append("Hello World!") b.upper assert b == "HELLO WORLD!"
# Changes each lower-case char in `self` by its upper-case variant # # ~~~ # var b = new Buffer # b.append("Hello World!") # b.upper # assert b == "HELLO WORLD!" # ~~~ fun upper is abstract
redef fun upper do if written then reset for i in [0 .. _length[ do self[i] = self[i].to_upper end