TestTreePath.kt 439 B

12345678910111213141516171819202122
  1. package com.gxzc.zen.api
  2. import com.gxzc.zen.common.contants.ZenConstants
  3. import org.junit.Test
  4. /**
  5. *
  6. * @author NorthLan
  7. * @date 2018/4/30
  8. * @url https://noahlan.com
  9. */
  10. class TestTreePath {
  11. @Test
  12. fun test1() {
  13. val path = "1-2-3-4"
  14. val paths = path.split(ZenConstants.TREE_PATH_SEPARATOR)
  15. println(path)
  16. println(paths)
  17. val a = paths.subList(0, paths.size - 2)
  18. println(a)
  19. }
  20. }