class EurekaUtils {

    public static final String getServiceIdFromInstanceId(String instanceId) {
        final int startIndex = instanceId.indexOf(':');
        if (startIndex < 0) return null;

        final int endIndex = instanceId.indexOf(':', startIndex + 1);
        if (endIndex < 0) return null;

        return instanceId.substring(startIndex + 1, endIndex);
    }

    private  EurekaUtils();

}