Java Version Convert To versionStringToInt(String version)

Here you can find the source of versionStringToInt(String version)

Description

version String To Int

License

Open Source License

Declaration

private static int[] versionStringToInt(String version) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static int[] versionStringToInt(String version) {
        String strippedVersion = version.split("-")[0];
        String[] strVersions = strippedVersion.split("\\.");
        int[] intVersions = new int[strVersions.length];
        for (int i = 0; i < strVersions.length; i++) {
            intVersions[i] = Integer.parseInt(strVersions[i]);
        }//from   w  w  w  . jav a  2 s.c  o  m
        return intVersions;
    }
}

Related

  1. versionStringToInt(String version)
  2. versionStringToNumber(String versionStr)
  3. versionToCode(String version)
  4. versionToSegments(String versionString, int idx, int i)
  5. versionToString(int version)