def get_string(data):
    """Get string ending with '\0'.
    
    Args:
        data: Data containing string.
    
    Returns:
        String without '\0'.
    """
    ret = ''
    for c in data:
        if '\x00' == c:
            break
        ret += c
    return ret