import codecs


def get_constant_string(bv, addr):
    """
    Returns the full string in memory
    :param bv: the BinaryView:
    :param addr: Address where the string is:
    :return string:
    """
    str_len = 0
    curr = codecs.encode(bv.read(addr, 1), "hex").decode()
    while (curr != "2e") and (curr != "00"):
        str_len += 1
        curr = codecs.encode(bv.read(addr + str_len, 1), "hex").decode()
    return bv.read(addr, str_len).decode()