private SlashActionCommand extractCommand(){
  final SlashActionCommand command=new SlashActionCommand();
  char ch=ci.current();
  if (ch == CharacterIterator.DONE) {
    command.setError("Missing slash command");
    return command;
  }
  if (Character.isWhitespace(ch)) {
    command.setError("Unexpected space after slash character");
    return command;
  }
  if (Character.isLetterOrDigit(ch)) {
    final StringBuilder buf=new StringBuilder();
    while ((ch != CharacterIterator.DONE) && !Character.isWhitespace(ch)) {
      buf.append(ch);
      ch=ci.next();
    }
    command.setName(buf.toString());
  }
 else {
    command.setName(String.valueOf(ch));
    ci.next();
  }
  return command;
}

private SlashActionCommand extractCommand ( ) { final SlashActionCommand command = new SlashActionCommand ( ) ; char ch = ci . current ( ) ; if ( ch == CharacterIterator . DONE ) { command . setError ( "Missing slash command" ) ; return command ; } if ( Character . isWhitespace ( ch ) ) { command . setError ( "Unexpected space after slash character" ) ; return command ; } if ( Character . isLetterOrDigit ( ch ) ) { final StringBuilder buf = new StringBuilder ( ) ; while ( ( ch != CharacterIterator . DONE ) && ! Character . isWhitespace ( ch ) ) { buf . append ( ch ) ; ch = ci . next ( ) ; } command . setName ( buf . toString ( ) ) ; } else { command . setName ( String . valueOf ( ch ) ) ; ci . next ( ) ; } return command ; }
extract slash command from the command line start .
