code: public static String parseRoot(String zookeepers) {
      int slashIndex = zookeepers.indexOf("/");
      if (slashIndex != -1) {
        return zookeepers.substring(slashIndex).trim();
      }
      return "/";
    }
docs: Parses chroot section of Zookeeper connection string
  
  @param zookeepers Zookeeper connection string
  @return Returns root path or "/" if none found