public class StringUtil
extends java.lang.Object
| Constructor | Description |
|---|---|
StringUtil() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
decapitalize(java.lang.String string) |
Decapitalize a String if it begins with a capital letter, e.g.: FooBar -> fooBar
|
static java.lang.String |
fromBytes(byte[] buf) |
Return a new String with chars corresponding to buf.
|
static java.lang.String |
fromBytes(byte[] buf,
int off,
int len) |
Return a new String with chars corresponding to buf from off to off + len.
|
static java.lang.String |
fromBytes(java.nio.ByteBuffer buf) |
Return a new String with chars corresponding to buf.
|
static java.lang.String |
fromBytes(BaseBytes b) |
Return a new String with chars corresponding to b.
|
static java.lang.String |
fromBytes(PyBuffer buf) |
Return a new String with chars corresponding to buf, which is a byte-oriented buffer obtained
through the buffer API.
|
static byte[] |
toBytes(java.lang.String string) |
Encodes this String into a sequence of bytes.
|
public static byte[] toBytes(java.lang.String string)
string - a String valuepublic static java.lang.String fromBytes(byte[] buf,
int off,
int len)
buf - an array of bytesoff - the initial offsetlen - the lengthpublic static java.lang.String fromBytes(byte[] buf)
buf - an array of bytespublic static java.lang.String fromBytes(java.nio.ByteBuffer buf)
buf - a ByteBuffer of bytespublic static java.lang.String fromBytes(PyBuffer buf)
PyBuffer.toString()
provided by each buffer implementation.buf - a PyBuffer of bytespublic static java.lang.String fromBytes(BaseBytes b)
b - a BaseBytes containing bytespublic static java.lang.String decapitalize(java.lang.String string)
string - a String