コード例 #1
0
  private int getHiFriendsNumber(String lessonString) {
    int index = HI_FRIENDS_PREFIX.length();
    String year = StringUtils.substring(lessonString, index, index + 1);

    return Integer.parseInt(year);
  }
コード例 #2
0
  private int getLessonNumber(String lessonString) {
    int index = HI_FRIENDS_PREFIX.length() + 1 + 1 + LESSONS_PREFIX.length();
    String lesson = StringUtils.substring(lessonString, index, index + 1);

    return Integer.parseInt(lesson);
  }