Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.text.TextUtils;

import java.util.ArrayList;

public class Main {
    public static String[] getStringIdArray(String serializedTree) {
        ArrayList<String> ids = new ArrayList<>();
        String[] values = serializedTree.split("[\\[\\],\"\\s]"); // Split on [ ] , or whitespace chars
        for (String idString : values) {
            if (!TextUtils.isEmpty(idString)) {
                ids.add(idString);
            }
        }
        return ids.toArray(new String[ids.size()]);
    }
}