public static Properties subProperties(Properties pr, String prefix) {
        if(pr==null || StrTry.isEmpty(prefix))
            return null;
        Properties res = new Properties();
        
        prefix = prefix.trim();
        int l = prefix.length();
        if(prefix.charAt(l)!='.'){
            prefix =  prefix+'.';
            l = prefix.length();
        }

        String keyname = "";            
        for(Map.Entry<Object,Object> k :pr.entrySet() ){
            keyname = (String)k.getKey();
           if (keyname.startsWith(prefix))
           { 
             res.setProperty( keyname.substring(l), (String)k.getValue());
           }  
        }
        return res; 
        
    }