public class PyString extends PyBaseString implements ClassDictInit
PyObject.ConversionException
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
exposed_name |
exposed_base
Constructor and Description |
---|
PyString() |
PyString(char c) |
PyString(PyType subType,
java.lang.String string) |
PyString(java.lang.String string) |
Modifier and Type | Method and Description |
---|---|
PyObject |
__add__(PyObject generic_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.
|
PyLong |
__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 |
__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.
|
PyObject |
__reduce__()
Used for pickling.
|
PyString |
__repr__()
Equivalent to the standard Python __repr__ 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__() |
java.lang.String |
asName(int index) |
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) |
static void |
classDictInit(PyObject dict)
Internal use only.
|
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) |
java.lang.String |
decode() |
java.lang.String |
decode(java.lang.String encoding) |
java.lang.String |
decode(java.lang.String encoding,
java.lang.String errors) |
static java.lang.String |
encode_UnicodeEscape(java.lang.String str,
boolean use_quotes) |
static java.lang.String |
encode_UnicodeEscape(java.lang.String str,
boolean use_quotes,
boolean unicodeDesignatorPresent) |
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(java.lang.String suffix) |
boolean |
endswith(java.lang.String suffix,
int start) |
boolean |
endswith(java.lang.String suffix,
int start,
int end) |
boolean |
equals(java.lang.Object other)
Should almost never be overridden.
|
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 java.lang.String |
from_bytes(byte[] buf) |
static java.lang.String |
from_bytes(byte[] buf,
int off,
int len) |
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() |
java.lang.String |
join(PyObject seq) |
java.lang.String |
ljust(int width) |
java.lang.String |
lower() |
java.lang.String |
lstrip() |
java.lang.String |
lstrip(java.lang.String sep) |
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) |
java.lang.String |
rstrip() |
java.lang.String |
rstrip(java.lang.String sep) |
java.lang.String |
safeRepr() |
PyList |
split() |
PyList |
split(java.lang.String sep) |
PyList |
split(java.lang.String sep,
int maxsplit) |
PyList |
splitlines() |
PyList |
splitlines(boolean keepends) |
boolean |
startswith(java.lang.String prefix) |
boolean |
startswith(java.lang.String prefix,
int offset) |
boolean |
startswith(java.lang.String 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 |
swapcase() |
java.lang.String |
title() |
static byte[] |
to_bytes(java.lang.String s) |
byte[] |
toBytes() |
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) |
static void |
typeSetup(PyObject dict,
PyType.Newstyle marker) |
java.lang.String |
upper() |
java.lang.String |
zfill(int width) |
__delitem__, __delslice__, __finditem__, __finditem__, __getitem__, __getslice__, __iter__, __nonzero__, __setitem__, __setitem__, __setslice__, isMappingType, isNumberType
__abs__, __and__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __coerce__, __coerce_ex__, __delattr__, __delattr__, __delete__, __delitem__, __delslice__, __dir__, __div__, __divmod__, __findattr__, __findattr__, __finditem__, __floordiv__, __get__, __getattr__, __getattr__, __getitem__, __getslice__, __hash__, __hex__, __iadd__, __iand__, __idiv__, __idivmod__, __ifloordiv__, __ilshift__, __imod__, __imul__, __ior__, __ipow__, __irshift__, __isub__, __iternext__, __itruediv__, __ixor__, __lshift__, __mul__, __not__, __oct__, __or__, __pow__, __pow__, __radd__, __rand__, __rdiv__, __rdivmod__, __rfloordiv__, __rlshift__, __rmod__, __rmul__, __ror__, __rpow__, __rrshift__, __rshift__, __rsub__, __rtruediv__, __rxor__, __set__, __setattr__, __setattr__, __setitem__, __setslice__, __sub__, __truediv__, __xor__, _add, _and, _callextra, _cmp, _div, _divmod, _doget, _doget, _doset, _eq, _floordiv, _ge, _gt, _in, _is, _isnot, _jcall, _jcallexc, _jthrow, _le, _lshift, _lt, _mod, _mul, _ne, _notin, _or, _pow, _rshift, _sub, _truediv, _xor, asInt, asLong, asStringOrNull, delDict, delType, dispatch__init__, fastGetClass, fastGetDict, getDict, getDoc, getType, implementsDescrDelete, implementsDescrSet, invoke, invoke, invoke, invoke, invoke, isCallable, isDataDescr, isSequenceType, noAttributeError, readonlyAttributeError, setDict, setType
public static final java.lang.String exposed_name
public PyString()
public PyString(PyType subType, java.lang.String string)
public PyString(java.lang.String string)
public PyString(char c)
public static void typeSetup(PyObject dict, PyType.Newstyle marker)
public static void classDictInit(PyObject dict) throws PyIgnoreMethodTag
PyIgnoreMethodTag
public java.lang.String safeRepr() throws PyIgnoreMethodTag
safeRepr
in class PyObject
PyIgnoreMethodTag
public PyString __str__()
PyObject
PyObject
is to
override the standard Java toString
method.public PyUnicode __unicode__()
__unicode__
in class PyObject
public int __len__()
PyObject
public java.lang.String internedString()
public PyString __repr__()
PyObject
PyObject
is to
override the standard Java toString
method.public static java.lang.String encode_UnicodeEscape(java.lang.String str, boolean use_quotes)
public static java.lang.String encode_UnicodeEscape(java.lang.String str, boolean use_quotes, boolean unicodeDesignatorPresent)
public static java.lang.String decode_UnicodeEscape(java.lang.String str, int start, int end, java.lang.String errors, boolean unicode)
public boolean equals(java.lang.Object other)
PyObject
a.equals(b) == true
iff cmp(a,b) == 0
public int __cmp__(PyObject other)
PyObject
public PyObject __eq__(PyObject other)
PyObject
__eq__
in class PySequence
other
- the object to compare this with.public PyObject __ne__(PyObject other)
PyObject
__ne__
in class PySequence
other
- the object to compare this with.public PyObject __lt__(PyObject other)
PyObject
__lt__
in class PySequence
other
- the object to compare this with.public PyObject __le__(PyObject other)
PyObject
__le__
in class PySequence
other
- the object to compare this with.public PyObject __gt__(PyObject other)
PyObject
__gt__
in class PySequence
other
- the object to compare this with.public PyObject __ge__(PyObject other)
PyObject
__ge__
in class PySequence
other
- the object to compare this with.public byte[] toBytes()
public static byte[] to_bytes(java.lang.String s)
public static java.lang.String from_bytes(byte[] buf)
public static java.lang.String from_bytes(byte[] buf, int off, int len)
public java.lang.Object __tojava__(java.lang.Class c)
PyObject
Py.NoConversion
if this PyObject
can not be converted to the
desired Java class.__tojava__
in class PySequence
c
- the Class to convert this PyObject
to.public PyString createInstance(java.lang.String str)
public boolean __contains__(PyObject o)
PyObject
__contains__
in class PyObject
o
- the element to search for in this container.public PyObject __add__(PyObject generic_other)
PyObject
public PyObject __reduce__()
__reduce__
in class PyObject
public PyTuple __getnewargs__()
__getnewargs__
in class PyObject
public PyObject __mod__(PyObject other)
PyObject
public PyObject __int__()
PyObject
public PyLong __long__()
PyObject
public PyFloat __float__()
PyObject
public PyObject __pos__()
PyObject
public PyObject __neg__()
PyObject
public PyObject __invert__()
PyObject
__invert__
in class PyObject
public PyComplex __complex__()
PyObject
__complex__
in class PyObject
public 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()
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 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 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 java.lang.String join(PyObject seq)
public boolean startswith(java.lang.String prefix)
public boolean startswith(java.lang.String prefix, int offset)
public boolean startswith(java.lang.String prefix, int start, int end)
public boolean endswith(java.lang.String suffix)
public boolean endswith(java.lang.String suffix, int start)
public boolean endswith(java.lang.String 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 java.lang.String decode()
public java.lang.String decode(java.lang.String encoding)
public java.lang.String decode(java.lang.String encoding, java.lang.String errors)
public java.lang.String asString(int index) throws PyObject.ConversionException
asString
in class PyObject
PyObject.ConversionException
public java.lang.String asName(int index) throws PyObject.ConversionException
asName
in class PyObject
PyObject.ConversionException