<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def match_string(self, string, word=0, offset=0):
 """Returns 1 if string can be matches against SourceString's current position. If word is >= 1 then it will only match string followed by whitepsace. """

        if word:
            return self.get_string(offset) == string
        return self.get_length(len(string), offset) == string