| |
Methods defined here:
- __add__(self, string)
- >>> (WideString("a") + WideString("b")).string
'ab'
>>> (WideString("a") + WideString("b")).chars
['a', 'b']
>>> (WideString("afd") + "bc").chars
['a', 'f', 'd', 'b', 'c']
- __getitem__(self, i)
- >>> WideString("asdf")[2]
<WideString 'd'>
>>> WideString("……")[0]
<WideString '…'>
>>> WideString("……")[1]
<WideString '…'>
- __getslice__(self, a, z)
- >>> WideString("asdf")[1:3]
<WideString 'sd'>
>>> WideString("asdf")[1:-100]
<WideString ''>
>>> WideString("モヒカン")[2:4]
<WideString 'ヒ'>
>>> WideString("モヒカン")[2:5]
<WideString 'ヒ '>
>>> WideString("モabカン")[2:5]
<WideString 'ab '>
>>> WideString("モヒカン")[1:5]
<WideString ' ヒ '>
>>> WideString("モヒカン")[:]
<WideString 'モヒカン'>
>>> WideString("aモ")[0:3]
<WideString 'aモ'>
>>> WideString("aモ")[0:2]
<WideString 'a '>
>>> WideString("aモ")[0:1]
<WideString 'a'>
- __init__(self, string, chars=None)
- __len__(self)
- >>> len(WideString("poo"))
3
>>> len(WideString("モヒカン"))
8
- __radd__(self, string)
- >>> ("bc" + WideString("afd")).chars
['b', 'c', 'a', 'f', 'd']
- __repr__(self)
- __str__(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|