Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    private static String getDynamicOptionParentInstanceId(String nodeset) {
        if (nodeset == null)
            return null;

        int pos1 = nodeset.lastIndexOf('/');
        if (pos1 < 0)
            return null;

        int pos2 = nodeset.lastIndexOf(']');
        if (pos2 < 0 || (pos1 == pos2))
            return null;

        return nodeset.substring(pos1 + 1, pos2);
    }
}