goja-core/src/main/java/goja/core/kits/lang/Strs.java
public static Properties splitArrayElementsIntoProperties(
            String[] array, String delimiter, String charsToDelete) {

        if (ObjectKit.isEmpty(array)) {
            return null;
        }
        Properties result = new Properties();
        for (String element : array) {
            if (charsToDelete != null) {
                element = deleteAny(element, charsToDelete);
            }
            String[] splittedElement = split(element, delimiter);
            if (splittedElement == null) {
                continue;
            }
            result.setProperty(splittedElement[0].trim(), splittedElement[1].trim());
        }
        return result;
    }
public static Properties splitArrayElementsIntoProperties(
            String[] array, String delimiter, String charsToDelete) {

        if (ObjectKit.isEmpty(array)) {
            return null;
        }
        Properties result = new Properties();
        for (String element : array) {
            if (charsToDelete != null) {
                element = deleteAny(element, charsToDelete);
            }
            String[] splittedElement = split(element, delimiter);
            if (splittedElement == null) {
                continue;
            }
            result.setProperty(splittedElement[0].trim(), splittedElement[1].trim());
        }
        return result;
    }
public static Properties splitArrayElementsIntoProperties ( String [ ] array , String delimiter , String charsToDelete ) { if ( ObjectKit . isEmpty ( array ) ) { return null ; } Properties result = new Properties ( ) ; for ( String element : array ) { if ( charsToDelete != null ) { element = deleteAny ( element , charsToDelete ) ; } String [ ] splittedElement = split ( element , delimiter ) ; if ( splittedElement == null ) { continue ; } result . setProperty ( splittedElement [ 0 ] . trim ( ) , splittedElement [ 1 ] . trim ( ) ) ; } return result ; }
Take an array Strings and split each element based on the given delimiter.
A {@code Properties} instance is then generated, with the left of the
delimiter providing the key, and the right of the delimiter providing the value.
<p>Will trim both the key and value before adding them to the
{@code Properties} instance.

@param array         the array to process
@param delimiter     to split each element using (typically the equals symbol)
@param charsToDelete one or more characters to remove from each element
prior to attempting the split operation (typically the quotation mark
symbol), or {@code null} if no removal should occur
@return a {@code Properties} instance representing the array contents,
or {@code null} if the array to process was {@code null} or empty
Take an array Strings and split each element based on the given delimiter . A { @code Properties } instance is then generated with the left of the delimiter providing the key and the right of the delimiter providing the value . <p > Will trim both the key and value before adding them to the { @code Properties } instance .