class CustomVMImageNameProvider {

    public static String get(String region, String vhdName) {
        String name = vhdName + DELIMITER + region.toLowerCase().replaceAll("\\s", "");
        if (name.length() > NAME_MAXIMUM_LENGTH) {
            int diff = name.length() - NAME_MAXIMUM_LENGTH;
            int calculatedEndIndexOfVhdName = vhdName.length() - diff;
            name = vhdName.substring(0, calculatedEndIndexOfVhdName) + '-' + region.toLowerCase().replaceAll("\\s", "");
        }
        return name;
    }

    private  CustomVMImageNameProvider();

}