package ru.micord.ervu.util;


import static org.apache.commons.lang3.StringUtils.capitalize;
import static org.apache.commons.lang3.StringUtils.substring;

public final class StringUtils {

  private StringUtils() {
  }

  public static String convertToFio(String firstName, String middleName, String lastName) {
    String firstNameInitial = substring(firstName, 0, 1).toUpperCase();
    String middleNameInitial =  substring(middleName, 0, 1).toUpperCase();
    return String.format("%s %s.%s.",
        capitalize(lastName),
        firstNameInitial,
        middleNameInitial
    );
  }
}
