|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.python.core.PyObject
org.python.core.PySequence
org.python.core.PyBaseString
org.python.core.PyString
public class PyString
A builtin python string.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.python.core.PyObject |
|---|
PyObject.ConversionException |
| Field Summary | |
|---|---|
static PyType |
TYPE
|
| Fields inherited from class org.python.core.PySequence |
|---|
gListAllocatedStatus |
| Constructor Summary | |
|---|---|
PyString()
|
|
PyString(char c)
|
|
PyString(PyType subType,
java.lang.String string)
|
|
PyString(java.lang.String string)
|
|
| Method Summary | |
|---|---|
PyObject |
__add__(PyObject other)
Equivalent to the standard Python __add__ method |
int |
__cmp__(PyObject other)
Equivalent to the standard Python __cmp__ method. |
PyComplex |
__complex__()
Equivalent to the standard Python __complex__ method. |
boolean |
__contains__(PyObject o)
Equivalent to the standard Python __contains__ method. |
PyObject |
__eq__(PyObject other)
Equivalent to the standard Python __eq__ method. |
PyFloat |
__float__()
Equivalent to the standard Python __float__ method. |
PyObject |
__ge__(PyObject other)
Equivalent to the standard Python __ge__ method. |
PyTuple |
__getnewargs__()
|
PyObject |
__gt__(PyObject other)
Equivalent to the standard Python __gt__ method. |
PyObject |
__int__()
Equivalent to the standard Python __int__ method. |
PyObject |
__invert__()
Equivalent to the standard Python __invert__ method. |
PyObject |
__le__(PyObject other)
Equivalent to the standard Python __le__ method. |
int |
__len__()
Equivalent to the standard Python __len__ method. |
PyObject |
__long__()
Equivalent to the standard Python __long__ method. |
PyObject |
__lt__(PyObject other)
Equivalent to the standard Python __lt__ method. |
PyObject |
__mod__(PyObject other)
Equivalent to the standard Python __mod__ method |
PyObject |
__mul__(PyObject o)
Equivalent to the standard Python __mul__ method |
PyObject |
__ne__(PyObject other)
Equivalent to the standard Python __ne__ method. |
PyObject |
__neg__()
Equivalent to the standard Python __neg__ method. |
PyObject |
__pos__()
Equivalent to the standard Python __pos__ method. |
PyString |
__repr__()
Equivalent to the standard Python __repr__ method. |
PyObject |
__rmul__(PyObject o)
Equivalent to the standard Python __rmul__ method |
PyString |
__str__()
Equivalent to the standard Python __str__ method. |
java.lang.Object |
__tojava__(java.lang.Class c)
Equivalent to the Jython __tojava__ method. |
PyUnicode |
__unicode__()
|
int |
asInt()
|
java.lang.String |
asName(int index)
|
java.lang.String |
asString()
|
java.lang.String |
asString(int index)
|
double |
atof()
|
int |
atoi()
|
int |
atoi(int base)
|
PyLong |
atol()
|
PyLong |
atol(int base)
|
java.lang.String |
capitalize()
|
java.lang.String |
center(int width)
|
int |
count(java.lang.String sub)
|
int |
count(java.lang.String sub,
int start)
|
int |
count(java.lang.String sub,
int start,
int end)
|
PyString |
createInstance(java.lang.String str)
|
static java.lang.String |
decode_UnicodeEscape(java.lang.String str,
int start,
int end,
java.lang.String errors,
boolean unicode)
|
PyObject |
decode()
|
PyObject |
decode(java.lang.String encoding)
|
PyObject |
decode(java.lang.String encoding,
java.lang.String errors)
|
static java.lang.String |
encode_UnicodeEscape(java.lang.String str,
boolean use_quotes)
|
java.lang.String |
encode()
|
java.lang.String |
encode(java.lang.String encoding)
|
java.lang.String |
encode(java.lang.String encoding,
java.lang.String errors)
|
boolean |
endswith(PyObject suffix)
|
boolean |
endswith(PyObject suffix,
int start)
|
boolean |
endswith(PyObject suffix,
int start,
int end)
|
java.lang.String |
expandtabs()
|
java.lang.String |
expandtabs(int tabsize)
|
int |
find(java.lang.String sub)
|
int |
find(java.lang.String sub,
int start)
|
int |
find(java.lang.String sub,
int start,
int end)
|
static PyString |
fromInterned(java.lang.String interned)
Creates a PyString from an already interned String. |
int |
hashCode()
|
int |
index(java.lang.String sub)
|
int |
index(java.lang.String sub,
int start)
|
int |
index(java.lang.String sub,
int start,
int end)
|
java.lang.String |
internedString()
|
boolean |
isalnum()
|
boolean |
isalpha()
|
boolean |
isdecimal()
|
boolean |
isdigit()
|
boolean |
islower()
|
boolean |
isnumeric()
|
boolean |
isspace()
|
boolean |
istitle()
|
boolean |
isunicode()
|
boolean |
isupper()
|
PyString |
join(PyObject seq)
|
java.lang.String |
ljust(int width)
|
java.lang.String |
ljust(int width,
java.lang.String padding)
|
java.lang.String |
lower()
|
java.lang.String |
lstrip()
|
java.lang.String |
lstrip(java.lang.String sep)
|
PyTuple |
partition(PyObject sepObj)
|
int |
rfind(java.lang.String sub)
|
int |
rfind(java.lang.String sub,
int start)
|
int |
rfind(java.lang.String sub,
int start,
int end)
|
int |
rindex(java.lang.String sub)
|
int |
rindex(java.lang.String sub,
int start)
|
int |
rindex(java.lang.String sub,
int start,
int end)
|
java.lang.String |
rjust(int width)
|
PyTuple |
rpartition(PyObject sepObj)
|
PyList |
rsplit()
|
PyList |
rsplit(java.lang.String sep)
|
PyList |
rsplit(java.lang.String sep,
int maxsplit)
|
java.lang.String |
rstrip(java.lang.String sep)
|
PyList |
split()
|
PyList |
split(java.lang.String sep)
|
PyList |
split(java.lang.String sep,
int maxsplit)
|
PyList |
splitlines()
|
PyList |
splitlines(boolean keepends)
|
boolean |
startswith(PyObject prefix)
|
boolean |
startswith(PyObject prefix,
int offset)
|
boolean |
startswith(PyObject prefix,
int start,
int end)
|
PyObject |
str___mod__(PyObject other)
|
java.lang.String |
strip()
|
java.lang.String |
strip(java.lang.String sep)
|
java.lang.String |
substring(int start,
int end)
|
java.lang.String |
swapcase()
|
java.lang.String |
title()
|
byte[] |
toBytes()
|
int[] |
toCodePoints()
|
java.lang.String |
toString()
|
java.lang.String |
translate(PyObject table)
|
java.lang.String |
translate(java.lang.String table)
|
java.lang.String |
translate(java.lang.String table,
java.lang.String deletechars)
|
java.lang.String |
upper()
|
java.lang.String |
zfill(int width)
|
| Methods inherited from class org.python.core.PySequence |
|---|
__delitem__, __delslice__, __finditem__, __finditem__, __getitem__, __getslice__, __iter__, __nonzero__, __setitem__, __setitem__, __setslice__, isMappingType, isNumberType |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final PyType TYPE
| Constructor Detail |
|---|
public PyString()
public PyString(PyType subType,
java.lang.String string)
public PyString(java.lang.String string)
public PyString(char c)
| Method Detail |
|---|
public static PyString fromInterned(java.lang.String interned)
public int[] toCodePoints()
public java.lang.String substring(int start,
int end)
public PyString __str__()
PyObjectPyObject is to
override the standard Java toString method.
__str__ in class PyObjectpublic PyUnicode __unicode__()
__unicode__ in class PyObjectpublic int __len__()
PyObject
__len__ in class PyObjectpublic java.lang.String toString()
toString in class PyObjectpublic java.lang.String internedString()
public PyString __repr__()
PyObjectPyObject is to
override the standard Java toString method.
__repr__ in class PyObject
public static java.lang.String encode_UnicodeEscape(java.lang.String str,
boolean use_quotes)
public static java.lang.String decode_UnicodeEscape(java.lang.String str,
int start,
int end,
java.lang.String errors,
boolean unicode)
public int __cmp__(PyObject other)
PyObject
__cmp__ in class PyObjectother - the object to compare this with.
public PyObject __eq__(PyObject other)
PyObject
__eq__ in class PySequenceother - the object to compare this with.
public PyObject __ne__(PyObject other)
PyObject
__ne__ in class PySequenceother - the object to compare this with.
public PyObject __lt__(PyObject other)
PyObject
__lt__ in class PySequenceother - the object to compare this with.
public PyObject __le__(PyObject other)
PyObject
__le__ in class PySequenceother - the object to compare this with.
public PyObject __gt__(PyObject other)
PyObject
__gt__ in class PySequenceother - the object to compare this with.
public PyObject __ge__(PyObject other)
PyObject
__ge__ in class PySequenceother - the object to compare this with.
public int hashCode()
hashCode in class PyObjectpublic byte[] toBytes()
public java.lang.Object __tojava__(java.lang.Class c)
PyObjectPy.NoConversion
if this PyObject can not be converted to the
desired Java class.
__tojava__ in class PySequencec - the Class to convert this PyObject to.public PyString createInstance(java.lang.String str)
public boolean __contains__(PyObject o)
PyObject
__contains__ in class PyObjecto - the element to search for in this container.
public PyObject __mul__(PyObject o)
PyObject
__mul__ in class PyObjecto - the object to perform this binary operation with
(the right-hand operand).
public PyObject __rmul__(PyObject o)
PyObject
__rmul__ in class PyObjecto - the object to perform this binary operation with
(the left-hand operand).
public PyObject __add__(PyObject other)
PyObject
__add__ in class PyObjectother - the object to perform this binary operation with
(the right-hand operand).
public PyTuple __getnewargs__()
__getnewargs__ in class PyObjectpublic PyObject __mod__(PyObject other)
PyObject
__mod__ in class PyObjectother - the object to perform this binary operation with
(the right-hand operand).
public PyObject str___mod__(PyObject other)
public PyObject __int__()
PyObject
__int__ in class PyObjectpublic PyObject __long__()
PyObject
__long__ in class PyObjectpublic PyFloat __float__()
PyObject
__float__ in class PyObjectpublic PyObject __pos__()
PyObject
__pos__ in class PyObjectpublic PyObject __neg__()
PyObject
__neg__ in class PyObjectpublic PyObject __invert__()
PyObject
__invert__ in class PyObjectpublic PyComplex __complex__()
PyObject
__complex__ in class PyObjectpublic java.lang.String lower()
public java.lang.String upper()
public java.lang.String title()
public java.lang.String swapcase()
public java.lang.String strip()
public java.lang.String strip(java.lang.String sep)
public java.lang.String lstrip()
public java.lang.String lstrip(java.lang.String sep)
public java.lang.String rstrip(java.lang.String sep)
public PyList split()
public PyList split(java.lang.String sep)
public PyList split(java.lang.String sep,
int maxsplit)
public PyList rsplit()
public PyList rsplit(java.lang.String sep)
public PyList rsplit(java.lang.String sep,
int maxsplit)
public PyTuple partition(PyObject sepObj)
public PyTuple rpartition(PyObject sepObj)
public PyList splitlines()
public PyList splitlines(boolean keepends)
public int index(java.lang.String sub)
public int index(java.lang.String sub,
int start)
public int index(java.lang.String sub,
int start,
int end)
public int rindex(java.lang.String sub)
public int rindex(java.lang.String sub,
int start)
public int rindex(java.lang.String sub,
int start,
int end)
public int count(java.lang.String sub)
public int count(java.lang.String sub,
int start)
public int count(java.lang.String sub,
int start,
int end)
public int find(java.lang.String sub)
public int find(java.lang.String sub,
int start)
public int find(java.lang.String sub,
int start,
int end)
public int rfind(java.lang.String sub)
public int rfind(java.lang.String sub,
int start)
public int rfind(java.lang.String sub,
int start,
int end)
public double atof()
public int atoi()
public int atoi(int base)
public PyLong atol()
public PyLong atol(int base)
public java.lang.String ljust(int width)
public java.lang.String ljust(int width,
java.lang.String padding)
public java.lang.String rjust(int width)
public java.lang.String center(int width)
public java.lang.String zfill(int width)
public java.lang.String expandtabs()
public java.lang.String expandtabs(int tabsize)
public java.lang.String capitalize()
public PyString join(PyObject seq)
public boolean startswith(PyObject prefix)
public boolean startswith(PyObject prefix,
int offset)
public boolean startswith(PyObject prefix,
int start,
int end)
public boolean endswith(PyObject suffix)
public boolean endswith(PyObject suffix,
int start)
public boolean endswith(PyObject suffix,
int start,
int end)
public java.lang.String translate(java.lang.String table)
public java.lang.String translate(java.lang.String table,
java.lang.String deletechars)
public java.lang.String translate(PyObject table)
public boolean islower()
public boolean isupper()
public boolean isalpha()
public boolean isalnum()
public boolean isdecimal()
public boolean isdigit()
public boolean isnumeric()
public boolean istitle()
public boolean isspace()
public boolean isunicode()
public java.lang.String encode()
public java.lang.String encode(java.lang.String encoding)
public java.lang.String encode(java.lang.String encoding,
java.lang.String errors)
public PyObject decode()
public PyObject decode(java.lang.String encoding)
public PyObject decode(java.lang.String encoding,
java.lang.String errors)
public java.lang.String asString(int index)
throws PyObject.ConversionException
asString in class PyObjectPyObject.ConversionExceptionpublic java.lang.String asString()
asString in class PyObjectpublic int asInt()
asInt in class PyObject
public java.lang.String asName(int index)
throws PyObject.ConversionException
asName in class PyObjectPyObject.ConversionException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||