Returns array of RDN attribute types from the given RDN string.
RDN string may contain multiple RDNs separated by "+".
For example, "uid+mail" string will return [uid, mail].

@param rdnStr the RDN string
@return the array of separated RDNs.
335911
public static String[] getRDNs(String rdnStr) {
        StringTokenizer st = new StringTokenizer(rdnStr.toLowerCase(), "+");
        ArrayList<String> list = new ArrayList<String>();
        while (st.hasMoreTokens()) {
            String rdn = st.nextToken();
            list.add(rdn);
        }
        return list.toArray(new String[0]);
    }
322945
def parse(self, rrstr):
        # type: (bytes) -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('NM record already initialized!')

        (su_len, su_entry_version_unused, self.posix_name_flags) = struct.unpack_from('=BBB', rrstr[:5], 2)

        # We assume that the caller has already checked the su_entry_version,
        # so we don't bother.

        name_len = su_len - 5
        if (self.posix_name_flags & 0x7) not in (0, 1, 2, 4):
            raise pycdlibexception.PyCdlibInvalidISO('Invalid Rock Ridge NM flags')

        if name_len != 0:
            if (self.posix_name_flags & (1 << 1)) or (self.posix_name_flags & (1 << 2)) or (self.posix_name_flags & (1 << 5)):
                raise pycdlibexception.PyCdlibInvalidISO('Invalid name in Rock Ridge NM entry (0x%x %d)' % (self.posix_name_flags, name_len))
            self.posix_name += rrstr[5:5 + name_len]

        self._initialized = True
634103
public Enumeration<String> getElements() {
        AttributeNameEnumeration elements = new AttributeNameEnumeration();
        elements.addElement(DN_NAME);

        return (elements.elements());
    }
875747
private static GeneralNames getFullNames(X500Name issuer, RDN rdn)
        throws IOException
    {
        List<RDN> rdns = new ArrayList<>(issuer.rdns());
        rdns.add(rdn);
        X500Name fullName = new X500Name(rdns.toArray(new RDN[0]));
        GeneralNames fullNames = new GeneralNames();
        fullNames.add(new GeneralName(fullName));
        return fullNames;
    }
1111092
private List<String> rdName()
	{
		List<String> names = new Vector<String>();
		names.add(rdIdentifier());

		if (ch == '`')
		{
			if (startOfName(rdCh()))
			{
				names.add(rdIdentifier());
			}
		}

		if (names.size() == 2)
		{
			// We have the strange mk_Mod`name case...

			String first = names.get(0);

			if (first.startsWith("mk_") || first.startsWith("is_"))
			{
				List<String> one = new Vector<String>();
				one.add(first + "`" + names.get(1));
				names = one;
			}
		}

		return names;
	}
628450
public List<T> list(String str)
    {
        Map<String,T> map = new LinkedHashMap<String,T>();

        if(str == null || str.length() == 0) // Select all resources by default
            str = "%";
        String[] tokens = str.split(",");
        for(String token : tokens)
        {
            token = token.trim();
            if(token.length() > 0)
            {
                Pattern pattern = Pattern.compile(token.replace("?", ".?").replace("%", ".*?"));
                for(NamedResource resource : names.values())
                {
                   if(pattern.matcher(resource.getName()).matches())
                        map.put(resource.getName(), (T)resource);
                }
            }
        }

        List<T> ret = new ArrayList<T>();
        ret.addAll(map.values());
        return ret;
    }
1085503
public String[] getTypeArr() {
		List<String> list = new ArrayList<>();
		From index = null;
		for (int i = 0; i < from.size(); i++) {
			index = from.get(i);
			if (index.getType() != null && index.getType().trim().length() > 0) {
				list.add(index.getType());
			}
		}
		if (list.size() == 0) {
			return null;
		}

		return list.toArray(new String[list.size()]);
	}
1149798
public Enumeration<String> getElements() {
        AttributeNameEnumeration elements = new AttributeNameEnumeration();
        elements.addElement(PERMITTED_SUBTREES);
        elements.addElement(EXCLUDED_SUBTREES);

        return (elements.elements());
    }
307480
public static Map<QName, String> getAttributes(Node n) {
        Map<QName, String> map = new LinkedHashMap<QName, String>();
        NamedNodeMap m = n.getAttributes();
        if (m != null) {
            final int len = m.getLength();
            for (int i = 0; i < len; i++) {
                Attr a = (Attr) m.item(i);
                map.put(getQName(a), a.getValue());
            }
        }
        return map;
    }
749763
def get_attribute_references(instring):
    
    parsed = ConditionGrammar().conditions.parseString(instring)
    result = parsed if isinstance(parsed[0], str) else parsed[0]
    return result.attribute_reference.asList() if result.attribute_reference else []
1144300
static private String[] getStringList( String str )
    {
        if ( str == null )
        {
            return null;
        }
        List<String> list = new ArrayList<>();
        int i = 0;
        int length = str.length();
        StringBuffer sb = null;
        while ( i < length )
        {
            char ch = str.charAt( i );
            if ( ch == ' ' )
            {
                // A space was hit. Add string to list
                if ( sb != null )
                {
                    list.add( sb.toString() );
                    sb = null;
                }
            }
            else if ( ch == '\\' )
            {
                // It is a delimiter. Add next character
                if ( i + 1 < length )
                {
                    ch = str.charAt( ++i );
                    if ( sb == null )
                    {
                        sb = new StringBuffer();
                    }
                    sb.append( ch );
                }
            }
            else
            {
                if ( sb == null )
                {
                    sb = new StringBuffer();
                }
                sb.append( ch );
            }
            i++; // Next character
        }
        // Make sure to add the last part to the list too
        if ( sb != null )
        {
            list.add( sb.toString() );
        }
        if ( list.size() == 0 )
        {
            return null;
        }
        String[] results = new String[list.size()];
        return list.toArray( results );
    }
1303733
function stringToNumberArray(string, separator = "", setNaN = null) {
  if (isEmptyString(string)) {
    return [];
  }

  let array = string.split(separator);
  for (let i = 0; i < array.length; ++i) {
    array[i] = parseInt(array[i].trim(), 10);
    if (isNaN(array[i]) && setNaN !== null) {
      array[i] = setNaN;
    }
  }
  return array;
}
139625
public void setRDNAttributes(List<Map<String, Object>> rdnAttrList) throws MissingInitPropertyException {
        int size = rdnAttrList.size();
        // if size = 0, No RDN attributes defined. Same as RDN properties.
        if (size > 0) {
            iRDNAttrs = new String[size][];
            iRDNObjectClass = new String[size][];
            if (size == 1) {
                Map<String, Object> rdnAttr = rdnAttrList.get(0);
                String[] rdns = LdapHelper.getRDNs((String) rdnAttr.get(ConfigConstants.CONFIG_PROP_NAME));
                iRDNAttrs[0] = rdns;
            } else {
                int i = 0;
                for (Map<String, Object> rdnAttr : rdnAttrList) {
                    String name = (String) rdnAttr.get(ConfigConstants.CONFIG_PROP_NAME);
                    String[] rdns = LdapHelper.getRDNs(name);
                    iRDNAttrs[i] = rdns;
                    String[] objCls = (String[]) rdnAttr.get(ConfigConstants.CONFIG_PROP_OBJECTCLASS);
                    if (objCls == null) {
                        throw new MissingInitPropertyException(WIMMessageKey.MISSING_INI_PROPERTY, Tr.formatMessage(
                                                                                                                    tc,
                                                                                                                    WIMMessageKey.MISSING_INI_PROPERTY,
                                                                                                                    WIMMessageHelper.generateMsgParms(ConfigConstants.CONFIG_PROP_OBJECTCLASS)));
                    } else {
                        iRDNObjectClass[i] = objCls;
                    }
                    i++;
                }
            }
        }
    }
921264
private static NfsGetAttributes makeAttributes(Xdr xdr) {
        NfsGetAttributes attributes = null;
        if (xdr != null) {
            attributes = NfsResponseBase.makeNfsGetAttributes(xdr);
        }
        return attributes;
    }
631912
public static List<String> strArrayToList(String[] arr) {
		List<String> result = new ArrayList<String>();
		if (arr == null || arr.length == 0)
			return result;
		for (String str : arr)
			result.add(str);
		return result;
	}
771503
@Override
    public Enumeration<String> getHeaders(String hdr) {
        List<String> rc = this.request.getHeaders(hdr);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getHeaders: " + hdr + " " + rc.size());
        }
        return Collections.enumeration(rc);
    }
116091
public static InternetAddress[] parseAddressFromStrs(String[] addrStrs, Charset charset) {
		final List<InternetAddress> resultList = new ArrayList<>(addrStrs.length);
		InternetAddress[] addrs;
		for (int i = 0; i < addrStrs.length; i++) {
			addrs = parseAddress(addrStrs[i], charset);
			if(ArrayUtil.isNotEmpty(addrs)) {
				for(int j = 0 ; j < addrs.length; j++) {
					resultList.add(addrs[j]);
				}
			}
		}
		return resultList.toArray(new InternetAddress[resultList.size()]);
	}