Package org.jruby

Examples of org.jruby.RubyString.modify()


        switch (args.length) {
        case 2:
            originalString = args[1].convertToString();
            // must let original string know we're modifying, so shared buffers aren't damaged
            originalString.modify();
            buf = originalString.getByteList();
        case 1:
            if (!args[0].isNil()) {
                length = RubyNumeric.fix2int(args[0]);
                oldLength = length;
View Full Code Here


            str = RubyString.newStringLight(runtime, len);
        } else {
            RubyString s = str.convertToString();
            int clen = s.size();
            if (clen >= len) {
                s.modify();
                return s;
            }
            str = s;
            len -= clen;
            ((RubyString)str).modify(((RubyString)str).size() + len);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.