private Button removeButton(final ListView<String> listView) {
        final Button button = new Button("Remove Selected", FontAwesome.TIMES.view());
        
        button.setOnAction(e -> {
            final int selectedIdx = listView.getSelectionModel().getSelectedIndex();
            if (selectedIdx != -1 && listView.getItems().size() > 1) {
                final int newSelectedIdx = (selectedIdx == listView.getItems().size() - 1) ? selectedIdx - 1
                    : selectedIdx;
                listView.getItems().remove(selectedIdx);
                listView.getSelectionModel().select(newSelectedIdx);
            }
        });
        
        return button;
    }
Removes any empty substrings and makes sure the entire string is either
{@code null} or non-empty.

@return  the formatted string
plugin-parent/enum-generator/src/main/java/com/speedment/plugins/enums/internal/ui/AddRemoveStringItem.java