public void checkChars(String msg, String str, MutableString mut)
  {
    if (str.length() != mut.length())
      {
        fail(msg + " (strings have different lengths): " + 
             str.length() + " vs. " + mut.length());
      } // if the lengths differ
    for (int i = 0; i < str.length(); i++)
      {
        if (str.charAt(i) != mut.charAt(i))
          {
            fail(msg + " (mismatch at char " + i + "): " +
                 "'" + str.charAt(i) + "' vs '" + mut.charAt(i) + "'");
          } // if the characters don't match
      } // for i
  } // checkChars(String, String, MutableString)