org.python.core

Class PyString

public class PyString extends PyBaseString implements ClassDictInit

A builtin python string.
Field Summary
static Stringexposed_name
Constructor Summary
PyString()
PyString(PyType subType, String string)
PyString(String string)
PyString(char c)
Method Summary
StringasName(int index)
StringasString(int index)
doubleatof()
intatoi()
intatoi(int base)
PyLongatol()
PyLongatol(int base)
Stringcapitalize()
Stringcenter(int width)
static voidclassDictInit(PyObject dict)
Internal use only.
intcount(String sub)
intcount(String sub, int start)
intcount(String sub, int start, int end)
PyStringcreateInstance(String str)
Stringdecode()
Stringdecode(String encoding)
Stringdecode(String encoding, String errors)
static Stringdecode_UnicodeEscape(String str, int start, int end, String errors, boolean unicode)
Stringencode()
Stringencode(String encoding)
Stringencode(String encoding, String errors)
static Stringencode_UnicodeEscape(String str, boolean use_quotes)
static Stringencode_UnicodeEscape(String str, boolean use_quotes, boolean unicodeDesignatorPresent)
booleanendswith(String suffix)
booleanendswith(String suffix, int start)
booleanendswith(String suffix, int start, int end)
booleanequals(Object other)
Stringexpandtabs()
Stringexpandtabs(int tabsize)
intfind(String sub)
intfind(String sub, int start)
intfind(String sub, int start, int end)
inthashCode()
intindex(String sub)
intindex(String sub, int start)
intindex(String sub, int start, int end)
StringinternedString()
booleanisalnum()
booleanisalpha()
booleanisdecimal()
booleanisdigit()
booleanislower()
booleanisnumeric()
booleanisspace()
booleanistitle()
booleanisunicode()
booleanisupper()
Stringjoin(PyObject seq)
Stringljust(int width)
Stringlower()
Stringlstrip()
Stringlstrip(String sep)
intrfind(String sub)
intrfind(String sub, int start)
intrfind(String sub, int start, int end)
intrindex(String sub)
intrindex(String sub, int start)
intrindex(String sub, int start, int end)
Stringrjust(int width)
Stringrstrip()
Stringrstrip(String sep)
StringsafeRepr()
PyListsplit()
PyListsplit(String sep)
PyListsplit(String sep, int maxsplit)
PyListsplitlines()
PyListsplitlines(boolean keepends)
booleanstartswith(String prefix)
booleanstartswith(String prefix, int offset)
booleanstartswith(String prefix, int start, int end)
Stringstrip()
Stringstrip(String sep)
PyObjectstr___mod__(PyObject other)
Stringswapcase()
Stringtitle()
StringtoString()
static byte[]to_bytes(String s)
Stringtranslate(String table)
Stringtranslate(String table, String deletechars)
Stringtranslate(PyObject table)
static voidtypeSetup(PyObject dict, PyType.Newstyle marker)
Stringupper()
Stringzfill(int width)
PyObject__add__(PyObject generic_other)
int__cmp__(PyObject other)
PyComplex__complex__()
boolean__contains__(PyObject o)
PyObject__eq__(PyObject other)
PyFloat__float__()
PyTuple__getnewargs__()
PyObject__ge__(PyObject other)
PyObject__gt__(PyObject other)
PyObject__int__()
PyObject__invert__()
int__len__()
PyObject__le__(PyObject other)
PyLong__long__()
PyObject__lt__(PyObject other)
PyObject__mod__(PyObject other)
PyObject__neg__()
PyObject__ne__(PyObject other)
PyObject__pos__()
PyObject__reduce__()
Used for pickling.
PyString__repr__()
PyString__str__()
Object__tojava__(Class c)
PyUnicode__unicode__()

Field Detail

exposed_name

public static final String exposed_name

Constructor Detail

PyString

public PyString()

PyString

public PyString(PyType subType, String string)

PyString

public PyString(String string)

PyString

public PyString(char c)

Method Detail

asName

public String asName(int index)

asString

public String asString(int index)

atof

public double atof()

atoi

public int atoi()

atoi

public int atoi(int base)

atol

public PyLong atol()

atol

public PyLong atol(int base)

capitalize

public String capitalize()

center

public String center(int width)

classDictInit

public static void classDictInit(PyObject dict)
Internal use only. Do not call this method explicit.

count

public int count(String sub)

count

public int count(String sub, int start)

count

public int count(String sub, int start, int end)

createInstance

public PyString createInstance(String str)

decode

public String decode()

decode

public String decode(String encoding)

decode

public String decode(String encoding, String errors)

decode_UnicodeEscape

public static String decode_UnicodeEscape(String str, int start, int end, String errors, boolean unicode)

encode

public String encode()

encode

public String encode(String encoding)

encode

public String encode(String encoding, String errors)

encode_UnicodeEscape

public static String encode_UnicodeEscape(String str, boolean use_quotes)

encode_UnicodeEscape

public static String encode_UnicodeEscape(String str, boolean use_quotes, boolean unicodeDesignatorPresent)

endswith

public boolean endswith(String suffix)

endswith

public boolean endswith(String suffix, int start)

endswith

public boolean endswith(String suffix, int start, int end)

equals

public boolean equals(Object other)

expandtabs

public String expandtabs()

expandtabs

public String expandtabs(int tabsize)

find

public int find(String sub)

find

public int find(String sub, int start)

find

public int find(String sub, int start, int end)

hashCode

public int hashCode()

index

public int index(String sub)

index

public int index(String sub, int start)

index

public int index(String sub, int start, int end)

internedString

public String internedString()

isalnum

public boolean isalnum()

isalpha

public boolean isalpha()

isdecimal

public boolean isdecimal()

isdigit

public boolean isdigit()

islower

public boolean islower()

isnumeric

public boolean isnumeric()

isspace

public boolean isspace()

istitle

public boolean istitle()

isunicode

public boolean isunicode()

isupper

public boolean isupper()

join

public String join(PyObject seq)

ljust

public String ljust(int width)

lower

public String lower()

lstrip

public String lstrip()

lstrip

public String lstrip(String sep)

rfind

public int rfind(String sub)

rfind

public int rfind(String sub, int start)

rfind

public int rfind(String sub, int start, int end)

rindex

public int rindex(String sub)

rindex

public int rindex(String sub, int start)

rindex

public int rindex(String sub, int start, int end)

rjust

public String rjust(int width)

rstrip

public String rstrip()

rstrip

public String rstrip(String sep)

safeRepr

public String safeRepr()

split

public PyList split()

split

public PyList split(String sep)

split

public PyList split(String sep, int maxsplit)

splitlines

public PyList splitlines()

splitlines

public PyList splitlines(boolean keepends)

startswith

public boolean startswith(String prefix)

startswith

public boolean startswith(String prefix, int offset)

startswith

public boolean startswith(String prefix, int start, int end)

strip

public String strip()

strip

public String strip(String sep)

str___mod__

public PyObject str___mod__(PyObject other)

swapcase

public String swapcase()

title

public String title()

toString

public String toString()

to_bytes

public static byte[] to_bytes(String s)

translate

public String translate(String table)

translate

public String translate(String table, String deletechars)

translate

public String translate(PyObject table)

typeSetup

public static void typeSetup(PyObject dict, PyType.Newstyle marker)

upper

public String upper()

zfill

public String zfill(int width)

__add__

public PyObject __add__(PyObject generic_other)

__cmp__

public int __cmp__(PyObject other)

__complex__

public PyComplex __complex__()

__contains__

public boolean __contains__(PyObject o)

__eq__

public PyObject __eq__(PyObject other)

__float__

public PyFloat __float__()

__getnewargs__

public PyTuple __getnewargs__()

__ge__

public PyObject __ge__(PyObject other)

__gt__

public PyObject __gt__(PyObject other)

__int__

public PyObject __int__()

__invert__

public PyObject __invert__()

__len__

public int __len__()

__le__

public PyObject __le__(PyObject other)

__long__

public PyLong __long__()

__lt__

public PyObject __lt__(PyObject other)

__mod__

public PyObject __mod__(PyObject other)

__neg__

public PyObject __neg__()

__ne__

public PyObject __ne__(PyObject other)

__pos__

public PyObject __pos__()

__reduce__

public PyObject __reduce__()
Used for pickling.

Returns: a tuple of (class, tuple)

__repr__

public PyString __repr__()

__str__

public PyString __str__()

__tojava__

public Object __tojava__(Class c)

__unicode__

public PyUnicode __unicode__()
Jython homepage