//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.tohi.common.pwdutil;

public class ArgsUtil {
    public ArgsUtil() {
    }

    public static void main(String[] args1) {
    }

    public String getvalue(String str) {
        if (str == null) {
            return "";
        } else {
            int pos = str.indexOf(61);
            if (pos > 0) {
                int pos1 = str.indexOf(32, pos);
                if (pos1 < pos) {
                    pos1 = str.length();
                }

                if (pos1 > pos + 1) {
                    return str.substring(pos + 1, pos1).trim();
                }
            }

            return "";
        }
    }

    public String getValue(String[] args, String name) {
        if (name != null && !"".equals(name) && args != null) {
            int len = args.length;

            for(int i = 0; i < len; ++i) {
                String temp = args[i].toLowerCase();
                if (temp.startsWith(name.toLowerCase())) {
                    return this.getvalue(temp);
                }
            }

            return null;
        } else {
            return null;
        }
    }
}
