src/main/java/seedu/address/ui/autocompleter/Autocompleter.java
private boolean lastCharIsStartOfPrefix(String commandBoxText) {
        if (commandBoxText.length() < 1) {
            return false;
        }
        String lastTwoCharacter = commandBoxText.substring(commandBoxText.length() - 2);
        return Arrays.stream(AutocompleteCommand.ALL_PREFIXES)
                .map(s -> SPACE + s.toString().substring(0, 1))
                .anyMatch(s -> s.equals(lastTwoCharacter));
    }
/**
     * Returns true if the last 2 characters of {@code commandBoxText} is a space followed
     * by the first letter of a {@code Prefix}
     */
Returns true if the last 2 characters of  commandBoxText is a space followed
by the first letter of a  Prefix
Returns true if the last 2 characters of commandBoxText is a space followed by the first letter of a Prefix
private boolean lastCharIsStartOfPrefix(String commandBoxText) {
        if (commandBoxText.length() < 1) {
            return false;
        }
        String lastTwoCharacter = commandBoxText.substring(commandBoxText.length() - 2);
        return Arrays.stream(AutocompleteCommand.ALL_PREFIXES)
                .map(s -> SPACE + s.toString().substring(0, 1))
                .anyMatch(s -> s.equals(lastTwoCharacter));
    }
private boolean lastCharIsStartOfPrefix ( String commandBoxText ) { if ( commandBoxText . length ( ) < 1 ) { return false ; } String lastTwoCharacter = commandBoxText . substring ( commandBoxText . length ( ) - 2 ) ; return Arrays . stream ( AutocompleteCommand . ALL_PREFIXES ) . map ( s -> SPACE + s . toString ( ) . substring ( 0 , 1 ) ) . anyMatch ( s -> s . equals ( lastTwoCharacter ) ) ; }
Returns true if the last 2 characters of {@code commandBoxText} is a space followed
 by the first letter of a {@code Prefix}
Returns true if the last 2 characters of { @code commandBoxText } is a space followed by the first letter of a { @code Prefix }