Java Code Examples for org.apache.commons.lang.StringUtils.ordinalIndexOf()

The following are Jave code examples for showing how to use ordinalIndexOf() of the org.apache.commons.lang.StringUtils class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: Reer   File: DefaultWindowsSdkLocator.java   Source Code and License Vote up 6 votes
private static String formatVersion(String version) {
    int index = StringUtils.ordinalIndexOf(version, ".", 2);

    if (index != -1) {
        version = version.substring(0, index);
    }

    return version;
}