function value = bank_is_valid ( s )

%*****************************************************************************80
%
%% bank_is_valid() reports whether a bank checksum is valid.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 October 2015
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    string S, a string containing 9 digits.
%    Dashes and other characters will be ignored.
%
%  Output:
%
%    logical VALUE, is TRUE if the string is valid.
%
  n = 9;
  dvec = s_to_digits ( s, n );

  d1 = bank_check_digit_calculate ( s );
  d2 = dvec(9);

  if ( d1 == d2 )
    value = 1;
  else
    value = 0;
  end

  return
end
