
function bytes = match_end(str, needle) 


    str_len = cols(str);
    needle_len = cols(needle);
    
    if (str_len >= needle_len) && tobool(str(1, str_len - needle_len + 1 : str_len) == needle)
        bytes = needle_len;
    else
        bytes = 0;
    end


end
