code: protected void removeLastFieldSeparator(final StringBuffer buffer) {
          final int len = buffer.length();
          final int sepLen = fieldSeparator.length();
          if (len > 0 && sepLen > 0 && len >= sepLen) {
              boolean match = true;
              for (int i = 0; i < sepLen; i++) {
                  if (buffer.charAt(len - 1 - i) != fieldSeparator.charAt(sepLen - 1 - i)) {
                      match = false;
                      break;
                  }
              }
              if (match) {
                  buffer.setLength(len - sepLen);
              }
          }
      }
docs: <p>Remove the last field separator from the buffer.</p>
  
  @param buffer  the <code>StringBuffer</code> to populate
  @since 2.0