org.jruby.util
Class StringSupport

java.lang.Object
  extended by org.jruby.util.StringSupport

public final class StringSupport
extends java.lang.Object


Field Summary
static int CR_7BIT
           
static int CR_BROKEN
           
static int CR_MASK
           
static int CR_UNKNOWN
           
static int CR_VALID
           
static java.lang.Object UNSAFE
           
 
Constructor Summary
StringSupport()
           
 
Method Summary
static int caseCmp(byte[] bytes1, int p1, byte[] bytes2, int p2, int len)
           
static int codeLength(Ruby runtime, org.jcodings.Encoding enc, int c)
           
static int codePoint(Ruby runtime, org.jcodings.Encoding enc, byte[] bytes, int p, int end)
           
static int codeRangeScan(org.jcodings.Encoding enc, byte[] bytes, int p, int len)
           
static int codeRangeScan(org.jcodings.Encoding enc, org.jruby.util.ByteList bytes)
           
static long codeRangeScanRestartable(org.jcodings.Encoding enc, byte[] bytes, int s, int end, int cr)
           
static long getAscii(org.jcodings.Encoding enc, byte[] bytes, int p, int end)
           
static long getAscii(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int len)
           
static int hexLength(byte[] bytes, int p, int len)
           
static int hexLength(byte[] bytes, int p, int len, org.jcodings.Encoding enc)
           
static int length(org.jcodings.Encoding enc, byte[] bytes, int p, int end)
           
static int nth(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n)
           
static int octLength(byte[] bytes, int p, int len)
           
static int octLength(byte[] bytes, int p, int len, org.jcodings.Encoding enc)
           
static int offset(org.jcodings.Encoding enc, byte[] bytes, int p, int end, int n)
           
static int preciseCodePoint(org.jcodings.Encoding enc, byte[] bytes, int p, int end)
           
static int preciseLength(org.jcodings.Encoding enc, byte[] bytes, int p, int end)
           
static int scanHex(byte[] bytes, int p, int len)
           
static int scanHex(byte[] bytes, int p, int len, org.jcodings.Encoding enc)
           
static int scanOct(byte[] bytes, int p, int len)
           
static int scanOct(byte[] bytes, int p, int len, org.jcodings.Encoding enc)
           
static int searchNonAscii(byte[] bytes, int p, int end)
           
static int searchNonAscii(org.jruby.util.ByteList bytes)
           
static int strLength(org.jruby.util.ByteList bytes)
           
static int strLength(org.jcodings.Encoding enc, byte[] bytes, int p, int end)
           
static long strLengthWithCodeRange(org.jruby.util.ByteList bytes)
           
static long strLengthWithCodeRange(org.jruby.util.ByteList bytes, org.jcodings.Encoding enc)
           
static long strLengthWithCodeRange(org.jcodings.Encoding enc, byte[] bytes, int p, int end)
           
static int toLower(org.jcodings.Encoding enc, int c)
           
static int toUpper(org.jcodings.Encoding enc, int c)
           
static int unpackArg(long cr)
           
static int unpackResult(long len)
           
static int utf8Length(byte[] bytes, int p, int end)
           
static int utf8Length(org.jruby.util.ByteList bytes)
           
static int utf8Nth(byte[] bytes, int p, int end, int n)
           
static int utf8Offset(byte[] bytes, int p, int end, int n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CR_MASK

public static final int CR_MASK
See Also:
Constant Field Values

CR_UNKNOWN

public static final int CR_UNKNOWN
See Also:
Constant Field Values

CR_7BIT

public static final int CR_7BIT
See Also:
Constant Field Values

CR_VALID

public static final int CR_VALID
See Also:
Constant Field Values

CR_BROKEN

public static final int CR_BROKEN
See Also:
Constant Field Values

UNSAFE

public static final java.lang.Object UNSAFE
Constructor Detail

StringSupport

public StringSupport()
Method Detail

length

public static int length(org.jcodings.Encoding enc,
                         byte[] bytes,
                         int p,
                         int end)

preciseLength

public static int preciseLength(org.jcodings.Encoding enc,
                                byte[] bytes,
                                int p,
                                int end)

searchNonAscii

public static int searchNonAscii(byte[] bytes,
                                 int p,
                                 int end)

searchNonAscii

public static int searchNonAscii(org.jruby.util.ByteList bytes)

codeRangeScan

public static int codeRangeScan(org.jcodings.Encoding enc,
                                byte[] bytes,
                                int p,
                                int len)

codeRangeScan

public static int codeRangeScan(org.jcodings.Encoding enc,
                                org.jruby.util.ByteList bytes)

codeRangeScanRestartable

public static long codeRangeScanRestartable(org.jcodings.Encoding enc,
                                            byte[] bytes,
                                            int s,
                                            int end,
                                            int cr)

utf8Length

public static int utf8Length(byte[] bytes,
                             int p,
                             int end)

utf8Length

public static int utf8Length(org.jruby.util.ByteList bytes)

strLength

public static int strLength(org.jcodings.Encoding enc,
                            byte[] bytes,
                            int p,
                            int end)

strLength

public static int strLength(org.jruby.util.ByteList bytes)

strLengthWithCodeRange

public static long strLengthWithCodeRange(org.jcodings.Encoding enc,
                                          byte[] bytes,
                                          int p,
                                          int end)

strLengthWithCodeRange

public static long strLengthWithCodeRange(org.jruby.util.ByteList bytes)

strLengthWithCodeRange

public static long strLengthWithCodeRange(org.jruby.util.ByteList bytes,
                                          org.jcodings.Encoding enc)

unpackResult

public static int unpackResult(long len)

unpackArg

public static int unpackArg(long cr)

codePoint

public static int codePoint(Ruby runtime,
                            org.jcodings.Encoding enc,
                            byte[] bytes,
                            int p,
                            int end)

codeLength

public static int codeLength(Ruby runtime,
                             org.jcodings.Encoding enc,
                             int c)

getAscii

public static long getAscii(org.jcodings.Encoding enc,
                            byte[] bytes,
                            int p,
                            int end)

getAscii

public static long getAscii(org.jcodings.Encoding enc,
                            byte[] bytes,
                            int p,
                            int end,
                            int len)

preciseCodePoint

public static int preciseCodePoint(org.jcodings.Encoding enc,
                                   byte[] bytes,
                                   int p,
                                   int end)

utf8Nth

public static int utf8Nth(byte[] bytes,
                          int p,
                          int end,
                          int n)

nth

public static int nth(org.jcodings.Encoding enc,
                      byte[] bytes,
                      int p,
                      int end,
                      int n)

utf8Offset

public static int utf8Offset(byte[] bytes,
                             int p,
                             int end,
                             int n)

offset

public static int offset(org.jcodings.Encoding enc,
                         byte[] bytes,
                         int p,
                         int end,
                         int n)

toLower

public static int toLower(org.jcodings.Encoding enc,
                          int c)

toUpper

public static int toUpper(org.jcodings.Encoding enc,
                          int c)

caseCmp

public static int caseCmp(byte[] bytes1,
                          int p1,
                          byte[] bytes2,
                          int p2,
                          int len)

scanHex

public static int scanHex(byte[] bytes,
                          int p,
                          int len)

scanHex

public static int scanHex(byte[] bytes,
                          int p,
                          int len,
                          org.jcodings.Encoding enc)

hexLength

public static int hexLength(byte[] bytes,
                            int p,
                            int len)

hexLength

public static int hexLength(byte[] bytes,
                            int p,
                            int len,
                            org.jcodings.Encoding enc)

scanOct

public static int scanOct(byte[] bytes,
                          int p,
                          int len)

scanOct

public static int scanOct(byte[] bytes,
                          int p,
                          int len,
                          org.jcodings.Encoding enc)

octLength

public static int octLength(byte[] bytes,
                            int p,
                            int len)

octLength

public static int octLength(byte[] bytes,
                            int p,
                            int len,
                            org.jcodings.Encoding enc)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.