<s> """<STR_LIT>""" <EOL> __author__ = ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> class Position ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , start , length ) : <EOL> """<STR_LIT>""" <EOL> self . start = start <EOL> self . length = length <EOL> def Get ( self , string ) : <EOL> """<STR_LIT>""" <EOL> return string [ self . start : self . start + self . length ] <EOL> def Set ( self , target , source ) : <EOL> """<STR_LIT>""" <EOL> return target [ : self . start ] + source + target [ self . start + self . length : ] <EOL> def AtEnd ( string ) : <EOL> """<STR_LIT>""" <EOL> return Position ( len ( string ) , <NUM_LIT:0> ) <EOL> AtEnd = staticmethod ( AtEnd ) <EOL> def IsAtEnd ( self , string ) : <EOL> """<STR_LIT>""" <EOL> return self . start == len ( string ) and self . length == <NUM_LIT:0> <EOL> def AtBeginning ( ) : <EOL> """<STR_LIT>""" <EOL> return Position ( <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> AtBeginning = staticmethod ( AtBeginning ) <EOL> def IsAtBeginning ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . start == <NUM_LIT:0> and self . length == <NUM_LIT:0> <EOL> def All ( string ) : <EOL> """<STR_LIT>""" <EOL> return Position ( <NUM_LIT:0> , len ( string ) ) <EOL> All = staticmethod ( All ) <EOL> def Index ( index ) : <EOL> """<STR_LIT>""" <EOL> return Position ( index , <NUM_LIT:1> ) <EOL> Index = staticmethod ( Index ) </s>
