Package org.jruby.util

Examples of org.jruby.util.ByteList.charAt()


    public static IRubyObject quote_name_part(final ThreadContext context,
        final IRubyObject self, final IRubyObject part) {

        final RubyString partString = (RubyString) part;
        final ByteList str = partString.getByteList();
        if ( str.charAt(0) == '[' && str.charAt(str.length() - 1) == ']' ) {
            return part; // part =~ /^\[.*\]$/ ? part
        }

        return quoteCharAndDecorateWith(context, partString, ']', ']', (byte) '[', (byte) ']');
    }
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.