OpenQuizz
Une application de gestion des contenus pédagogiques
EncodingBytes Class Reference
Inheritance diagram for EncodingBytes:
Collaboration diagram for EncodingBytes:

Public Member Functions

def __new__ (self, value)
 
def __init__ (self, value)
 
def __iter__ (self)
 
def __next__ (self)
 
def next (self)
 
def previous (self)
 
def setPosition (self, position)
 
def getPosition (self)
 
def getCurrentByte (self)
 
def skip (self, chars=spaceCharactersBytes)
 
def skipUntil (self, chars)
 
def matchBytes (self, bytes)
 
def jumpTo (self, bytes)
 

Properties

 position = property(getPosition, setPosition)
 
 currentByte = property(getCurrentByte)
 

Detailed Description

String-like object with an associated position and various extra methods
If the position is ever greater than the string length then an exception is
raised

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  value 
)

Member Function Documentation

◆ __iter__()

def __iter__ (   self)

◆ __new__()

def __new__ (   self,
  value 
)

◆ __next__()

def __next__ (   self)

◆ getCurrentByte()

def getCurrentByte (   self)

◆ getPosition()

def getPosition (   self)

◆ jumpTo()

def jumpTo (   self,
  bytes 
)
Look for the next sequence of bytes matching a given sequence. If
a match is found advance the position to the last byte of the match

◆ matchBytes()

def matchBytes (   self,
  bytes 
)
Look for a sequence of bytes at the start of a string. If the bytes
are found return True and advance the position to the byte after the
match. Otherwise return False and leave the position alone

◆ next()

def next (   self)

◆ previous()

def previous (   self)

◆ setPosition()

def setPosition (   self,
  position 
)

◆ skip()

def skip (   self,
  chars = spaceCharactersBytes 
)
Skip past a list of characters

◆ skipUntil()

def skipUntil (   self,
  chars 
)

Property Documentation

◆ currentByte

currentByte = property(getCurrentByte)
static

◆ position

position = property(getPosition, setPosition)
static

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