示例#1
0
  /**
   * Remove the some day keyword from the description
   *
   * @param toEditTask the task to edit
   * @param someDayKeyWords the keywords for someday
   */
  private void removeSomeDayKeyWord(Task toEditTask, String[] someDayKeyWords) {
    String matchedWord =
        StringHandler.getContainsWord(toEditTask.getDescription(), someDayKeyWords);
    String newDescription =
        StringHandler.removeFirstMatchedWord(toEditTask.getDescription(), matchedWord);

    toEditTask.setDescription(newDescription);
  }