package com.gxzc.zen.api import com.gxzc.zen.common.contants.ZenConstants import org.junit.Test /** * * @author NorthLan * @date 2018/4/30 * @url https://noahlan.com */ class TestTreePath { @Test fun test1() { val path = "1-2-3-4" val paths = path.split(ZenConstants.TREE_PATH_SEPARATOR) println(path) println(paths) val a = paths.subList(0, paths.size - 2) println(a) } }