function value = luhn_is_valid ( s )

%*****************************************************************************80
%
%% LUHN_IS_VALID determines whether a string with Luhn check digit is valid.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    10 September 2015
%
%  Reference:
%
%    https://en.wikipedia.org/wiki/Luhn_algorithm
%
%  Parameters:
%
%    Input, string S, the string of digits to be checked.
%
%    Output, int VALUE, TRUE if the string is valid.
%
  d = luhn_checksum ( s );

  if ( d == 0 )
    value = 1;
  else
    value = 0;
  end

  return
end