Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
UserString Class Reference
Inheritance diagram for UserString:
MutableString

Public Member Functions

def __init__
 
def __str__
 
def __repr__
 
def __int__
 
def __long__
 
def __float__
 
def __complex__
 
def __hash__
 
def __cmp__
 
def __contains__
 
def __len__
 
def __getitem__
 
def __getslice__
 
def __add__
 
def __radd__
 
def __iadd__
 
def __mul__
 
def __imul__
 
def capitalize
 
def center
 
def count
 
def decode
 
def encode
 
def endswith
 
def expandtabs
 
def find
 
def index
 
def isalpha
 
def isalnum
 
def isdecimal
 
def isdigit
 
def islower
 
def isnumeric
 
def isspace
 
def istitle
 
def isupper
 
def join
 
def ljust
 
def lower
 
def lstrip
 
def replace
 
def rfind
 
def rindex
 
def rjust
 
def rstrip
 
def split
 
def splitlines
 
def startswith
 
def strip
 
def swapcase
 
def title
 
def translate
 
def upper
 

Data Fields

 data
 

Detailed Description

Definition at line 13 of file UserString.py.

Constructor & Destructor Documentation

def __init__ (   self,
  seq 
)

Definition at line 14 of file UserString.py.

14 
15  def __init__(self, seq):
16  if isinstance(seq, StringType) or isinstance(seq, UnicodeType):
17  self.data = seq
18  elif isinstance(seq, UserString):
19  self.data = seq.data[:]
20  else:
self.data = str(seq)

Member Function Documentation

def __add__ (   self,
  other 
)

Definition at line 43 of file UserString.py.

References SymbolTable.__class__, UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, FormContentDict.data, and locale.str().

43 
44  def __add__(self, other):
45  if isinstance(other, UserString):
46  return self.__class__(self.data + other.data)
47  elif isinstance(other, StringType) or isinstance(other, UnicodeType):
48  return self.__class__(self.data + other)
49  else:
return self.__class__(self.data + str(other))
def __cmp__ (   self,
  string 
)

Definition at line 29 of file UserString.py.

References filecmp.cmp(), UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

29 
30  def __cmp__(self, string):
31  if isinstance(string, UserString):
32  return cmp(self.data, string.data)
33  else:
return cmp(self.data, string)
def __complex__ (   self)

Definition at line 26 of file UserString.py.

References UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

26 
def __complex__(self): return complex(self.data)
def __contains__ (   self,
  char 
)

Definition at line 34 of file UserString.py.

References UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

34 
35  def __contains__(self, char):
36  return char in self.data
def __float__ (   self)

Definition at line 25 of file UserString.py.

References UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

25 
def __float__(self): return float(self.data)
def __getitem__ (   self,
  index 
)

Definition at line 38 of file UserString.py.

References UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

38 
def __getitem__(self, index): return self.__class__(self.data[index])
def __getslice__ (   self,
  start,
  end 
)

Definition at line 39 of file UserString.py.

References SymbolTable.__class__, UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, FormContentDict.data, and sre_parse.max.

39 
40  def __getslice__(self, start, end):
41  start = max(start, 0); end = max(end, 0)
42  return self.__class__(self.data[start:end])
def __hash__ (   self)

Definition at line 27 of file UserString.py.

References UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

27 
28  def __hash__(self): return hash(self.data)
def __iadd__ (   self,
  other 
)

Definition at line 55 of file UserString.py.

References UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, FormContentDict.data, and locale.str().

55 
56  def __iadd__(self, other):
57  if isinstance(other, UserString):
58  self.data += other.data
59  elif isinstance(other, StringType) or isinstance(other, UnicodeType):
60  self.data += other
61  else:
62  self.data += str(other)
return self
def __imul__ (   self,
  n 
)

Definition at line 66 of file UserString.py.

References UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

66 
67  def __imul__(self, n):
68  self.data *= n
69  return self
def __int__ (   self)

Definition at line 23 of file UserString.py.

References UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

23 
def __int__(self): return int(self.data)
def __len__ (   self)

Definition at line 37 of file UserString.py.

References UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

37 
def __len__(self): return len(self.data)
def __long__ (   self)

Definition at line 24 of file UserString.py.

References UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

24 
def __long__(self): return long(self.data)
def __mul__ (   self,
  n 
)

Definition at line 63 of file UserString.py.

References SymbolTable.__class__, UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

63 
64  def __mul__(self, n):
return self.__class__(self.data*n)
def __radd__ (   self,
  other 
)

Definition at line 50 of file UserString.py.

References SymbolTable.__class__, UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, FormContentDict.data, and locale.str().

50 
51  def __radd__(self, other):
52  if isinstance(other, StringType) or isinstance(other, UnicodeType):
53  return self.__class__(other + self.data)
54  else:
return self.__class__(str(other) + self.data)
def __repr__ (   self)

Definition at line 22 of file UserString.py.

References UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

22 
def __repr__(self): return repr(self.data)
def __str__ (   self)

Definition at line 21 of file UserString.py.

References UserDict.data, UserList.data, UserString.data, _localized_month.data, _localized_day.data, SubPattern.data, _Hqxcoderengine.data, _Rlecoderengine.data, Request.data, simple_producer.data, _Environ.data, and FormContentDict.data.

21 
def __str__(self): return str(self.data)
def capitalize (   self)

Definition at line 71 of file UserString.py.

71 
def capitalize(self): return self.__class__(self.data.capitalize())
def center (   self,
  width 
)

Definition at line 72 of file UserString.py.

72 
def center(self, width): return self.__class__(self.data.center(width))
def count (   self,
  sub,
  start = 0,
  end = sys.maxint 
)

Definition at line 73 of file UserString.py.

73 
74  def count(self, sub, start=0, end=sys.maxint):
return self.data.count(sub, start, end)
def decode (   self,
  encoding = None,
  errors = None 
)

Definition at line 75 of file UserString.py.

References SymbolTable.__class__.

75 
76  def decode(self, encoding=None, errors=None): # XXX improve this?
77  if encoding:
78  if errors:
79  return self.__class__(self.data.decode(encoding, errors))
80  else:
81  return self.__class__(self.data.decode(encoding))
82  else:
return self.__class__(self.data.decode())
def encode (   self,
  encoding = None,
  errors = None 
)

Definition at line 83 of file UserString.py.

References SymbolTable.__class__.

83 
84  def encode(self, encoding=None, errors=None): # XXX improve this?
85  if encoding:
86  if errors:
87  return self.__class__(self.data.encode(encoding, errors))
88  else:
89  return self.__class__(self.data.encode(encoding))
90  else:
return self.__class__(self.data.encode())
def endswith (   self,
  suffix,
  start = 0,
  end = sys.maxint 
)

Definition at line 91 of file UserString.py.

91 
92  def endswith(self, suffix, start=0, end=sys.maxint):
return self.data.endswith(suffix, start, end)
def expandtabs (   self,
  tabsize = 8 
)

Definition at line 93 of file UserString.py.

References SymbolTable.__class__.

93 
94  def expandtabs(self, tabsize=8):
return self.__class__(self.data.expandtabs(tabsize))
def find (   self,
  sub,
  start = 0,
  end = sys.maxint 
)

Definition at line 95 of file UserString.py.

95 
96  def find(self, sub, start=0, end=sys.maxint):
return self.data.find(sub, start, end)
def index (   self,
  sub,
  start = 0,
  end = sys.maxint 
)

Definition at line 97 of file UserString.py.

97 
98  def index(self, sub, start=0, end=sys.maxint):
return self.data.index(sub, start, end)
def isalnum (   self)

Definition at line 100 of file UserString.py.

def isalnum(self): return self.data.isalnum()
def isalpha (   self)

Definition at line 99 of file UserString.py.

99 
def isalpha(self): return self.data.isalpha()
def isdecimal (   self)

Definition at line 101 of file UserString.py.

def isdecimal(self): return self.data.isdecimal()
def isdigit (   self)

Definition at line 102 of file UserString.py.

def isdigit(self): return self.data.isdigit()
def islower (   self)

Definition at line 103 of file UserString.py.

def islower(self): return self.data.islower()
def isnumeric (   self)

Definition at line 104 of file UserString.py.

def isnumeric(self): return self.data.isnumeric()
def isspace (   self)

Definition at line 105 of file UserString.py.

def isspace(self): return self.data.isspace()
def istitle (   self)

Definition at line 106 of file UserString.py.

def istitle(self): return self.data.istitle()
def isupper (   self)

Definition at line 107 of file UserString.py.

def isupper(self): return self.data.isupper()
def join (   self,
  seq 
)

Definition at line 108 of file UserString.py.

def join(self, seq): return self.data.join(seq)
def ljust (   self,
  width 
)

Definition at line 109 of file UserString.py.

def ljust(self, width): return self.__class__(self.data.ljust(width))
def lower (   self)

Definition at line 110 of file UserString.py.

def lower(self): return self.__class__(self.data.lower())
def lstrip (   self)

Definition at line 111 of file UserString.py.

def lstrip(self): return self.__class__(self.data.lstrip())
def replace (   self,
  old,
  new,
  maxsplit = -1 
)

Definition at line 112 of file UserString.py.

References SymbolTable.__class__.

113  def replace(self, old, new, maxsplit=-1):
return self.__class__(self.data.replace(old, new, maxsplit))
def rfind (   self,
  sub,
  start = 0,
  end = sys.maxint 
)

Definition at line 114 of file UserString.py.

115  def rfind(self, sub, start=0, end=sys.maxint):
return self.data.rfind(sub, start, end)
def rindex (   self,
  sub,
  start = 0,
  end = sys.maxint 
)

Definition at line 116 of file UserString.py.

117  def rindex(self, sub, start=0, end=sys.maxint):
return self.data.rindex(sub, start, end)
def rjust (   self,
  width 
)

Definition at line 118 of file UserString.py.

def rjust(self, width): return self.__class__(self.data.rjust(width))
def rstrip (   self)

Definition at line 119 of file UserString.py.

def rstrip(self): return self.__class__(self.data.rstrip())
def split (   self,
  sep = None,
  maxsplit = -1 
)

Definition at line 120 of file UserString.py.

121  def split(self, sep=None, maxsplit=-1):
return self.data.split(sep, maxsplit)
def splitlines (   self,
  keepends = 0 
)

Definition at line 122 of file UserString.py.

def splitlines(self, keepends=0): return self.data.splitlines(keepends)
def startswith (   self,
  prefix,
  start = 0,
  end = sys.maxint 
)

Definition at line 123 of file UserString.py.

124  def startswith(self, prefix, start=0, end=sys.maxint):
return self.data.startswith(prefix, start, end)
def strip (   self)

Definition at line 125 of file UserString.py.

def strip(self): return self.__class__(self.data.strip())
def swapcase (   self)

Definition at line 126 of file UserString.py.

def swapcase(self): return self.__class__(self.data.swapcase())
def title (   self)

Definition at line 127 of file UserString.py.

def title(self): return self.__class__(self.data.title())
def translate (   self,
  args 
)

Definition at line 128 of file UserString.py.

References SymbolTable.__class__.

129  def translate(self, *args):
return self.__class__(self.data.translate(*args))
def upper (   self)

Definition at line 130 of file UserString.py.

131  def upper(self): return self.__class__(self.data.upper())

Field Documentation

data

Definition at line 16 of file UserString.py.


The documentation for this class was generated from the following file: