def find_string_in_mappings(string_mappings, str_ptr):
    """
    Find string pointed by string_ptr in the string mapping
    list. Return None if not found.
    """
    if string_mappings is None:
        return None

    if len(string_mappings) == 0:
        return None

    if str_ptr in string_mappings:
        return string_mappings[str_ptr]

    # No direct match on pointer value.
    # This may be a combined string. So check for that.
    for ptr, string in string_mappings.items():
        if ptr <= str_ptr < (ptr + len(string)):
            whole_str = string_mappings[ptr]
            return whole_str[str_ptr - ptr:]

    return None