public class PyString extends PyBaseString
PyObject.ConversionException
Constructor and Description |
---|
PyString() |
PyString(char c) |
PyString(PyType subType,
String string) |
PyString(String string) |
Modifier and Type | Method and Description |
---|---|
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.
|
Object |
__tojava__(Class<?> c)
Equivalent to the Jython __tojava__ method.
|
PyUnicode |
__unicode__() |
double |
asDouble()
Convert this object into a double.
|
int |
asInt()
Convert this object into an int.
|
long |
asLong()
Convert this object longo an long.
|
String |
asName(int index) |
String |
asString() |
String |
asString(int index) |
double |
atof() |
int |
atoi() |
int |
atoi(int base) |
PyLong |
atol() |
PyLong |
atol(int base) |
String |
capitalize() |
String |
center(int width) |
int |
count(String sub) |
int |
count(String sub,
int start) |
int |
count(String sub,
int start,
int end) |
PyString |
createInstance(String str) |
static String |
decode_UnicodeEscape(String str,
int start,
int end,
String errors,
boolean unicode) |
PyObject |
decode() |
PyObject |
decode(String encoding) |
PyObject |
decode(String encoding,
String errors) |
static String |
encode_UnicodeEscape(String str,
boolean use_quotes) |
String |
encode() |
String |
encode(String encoding) |
String |
encode(String encoding,
String errors) |
boolean |
endswith(PyObject suffix) |
boolean |
endswith(PyObject suffix,
int start) |
boolean |
endswith(PyObject suffix,
int start,
int end) |
String |
expandtabs() |
String |
expandtabs(int tabsize) |
int |
find(String sub) |
int |
find(String sub,
int start) |
int |
find(String sub,
int start,
int end) |
static PyString |
fromInterned(String interned)
Creates a PyString from an already interned String.
|
String |
getString() |
int |
hashCode() |
int |
index(String sub) |
int |
index(String sub,
int start) |
int |
index(String sub,
int start,
int end) |
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) |
String |
ljust(int width) |
String |
ljust(int width,
String padding) |
String |
lower() |
String |
lstrip() |
String |
lstrip(String sep) |
PyTuple |
partition(PyObject sepObj) |
int |
rfind(String sub) |
int |
rfind(String sub,
int start) |
int |
rfind(String sub,
int start,
int end) |
int |
rindex(String sub) |
int |
rindex(String sub,
int start) |
int |
rindex(String sub,
int start,
int end) |
String |
rjust(int width) |
PyTuple |
rpartition(PyObject sepObj) |
PyList |
rsplit() |
PyList |
rsplit(String sep) |
PyList |
rsplit(String sep,
int maxsplit) |
String |
rstrip(String sep) |
PyList |
split() |
PyList |
split(String sep) |
PyList |
split(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) |
String |
strip() |
String |
strip(String sep) |
String |
substring(int start,
int end) |
String |
swapcase() |
String |
title() |
byte[] |
toBytes() |
int[] |
toCodePoints() |
String |
toString() |
String |
translate(PyObject table) |
String |
translate(String table) |
String |
translate(String table,
String deletechars) |
String |
upper() |
String |
zfill(int width) |
__delitem__, __delslice__, __finditem__, __finditem__, __getitem__, __getslice__, __iter__, __nonzero__, __setitem__, __setitem__, __setslice__, isMappingType, isNumberType, isSequenceType
__abs__, __and__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __coerce__, __coerce_ex__, __delattr__, __delattr__, __delete__, __delitem__, __delslice__, __dir__, __div__, __divmod__, __findattr__, __findattr__, __findattr_ex__, __finditem__, __floordiv__, __get__, __getattr__, __getattr__, __getitem__, __getslice__, __hash__, __hex__, __iadd__, __iand__, __idiv__, __idivmod__, __ifloordiv__, __ilshift__, __imod__, __imul__, __index__, __ior__, __ipow__, __irshift__, __isub__, __iternext__, __itruediv__, __ixor__, __lshift__, __not__, __oct__, __or__, __pow__, __pow__, __radd__, __rand__, __rdiv__, __rdivmod__, __reduce__, __reduce_ex__, __reduce_ex__, __rfloordiv__, __rlshift__, __rmod__, __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, _iadd, _iand, _idiv, _idivmod, _ifloordiv, _ilshift, _imod, _imul, _in, _ior, _ipow, _irshift, _is, _isnot, _isub, _itruediv, _ixor, _jcall, _jcallexc, _jthrow, _le, _lshift, _lt, _mod, _mul, _ne, _notin, _or, _pow, _rshift, _sub, _truediv, _xor, asIndex, asIndex, asInt, asIterable, asLong, asName, asStringOrNull, asStringOrNull, delDict, delType, dispatch__init__, equals, fastGetClass, fastGetDict, getDict, getType, implementsDescrDelete, implementsDescrGet, implementsDescrSet, invoke, invoke, invoke, invoke, invoke, invoke, isCallable, isDataDescr, isIndex, noAttributeError, readonlyAttributeError, setDict, setType
public static final PyType TYPE
public PyString()
public PyString(String string)
public PyString(char c)
public String getString()
public static PyString fromInterned(String interned)
public int[] toCodePoints()
public String substring(int start, int end)
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 String internedString()
public PyString __repr__()
PyObject
PyObject
is to
override the standard Java toString
method.public static String decode_UnicodeEscape(String str, int start, int end, String errors, boolean unicode)
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 Object __tojava__(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 boolean __contains__(PyObject o)
PyObject
__contains__
in class PyObject
o
- the element to search for in this container.public PyObject __mul__(PyObject o)
PyObject
public PyObject __rmul__(PyObject o)
PyObject
public PyObject __add__(PyObject other)
PyObject
public PyTuple __getnewargs__()
__getnewargs__
in class PyObject
public PyObject __mod__(PyObject other)
PyObject
public PyObject __int__()
PyObject
public PyObject __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 String lower()
public String upper()
public String title()
public String swapcase()
public String strip()
public String lstrip()
public PyList split()
public PyList rsplit()
public PyList splitlines()
public PyList splitlines(boolean keepends)
public int index(String sub)
public int index(String sub, int start)
public int index(String sub, int start, int end)
public int rindex(String sub)
public int rindex(String sub, int start)
public int rindex(String sub, int start, int end)
public int count(String sub)
public int count(String sub, int start)
public int count(String sub, int start, int end)
public int find(String sub)
public int find(String sub, int start)
public int find(String sub, int start, int end)
public int rfind(String sub)
public int rfind(String sub, int start)
public int rfind(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 String ljust(int width)
public String rjust(int width)
public String center(int width)
public String zfill(int width)
public String expandtabs()
public String expandtabs(int tabsize)
public String capitalize()
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 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 String encode()
public PyObject decode()
public String asString(int index) throws PyObject.ConversionException
asString
in class PyObject
PyObject.ConversionException
public int asInt()
PyObject
public long asLong()
PyObject
public double asDouble()
PyObject
public String asName(int index) throws PyObject.ConversionException
asName
in class PyObject
PyObject.ConversionException