Function format_tree

Source
pub fn format_tree(tree: &Tree, indent: &str) -> String
Expand description

Writes the tree with indentations

use phylotree::tree::Tree;

let newick = "(A,B);";
let tree = Tree::from_newick(newick).unwrap();

assert_eq!(nwr::format_tree(&tree, "  "), "(\n  A,\n  B\n);".to_string());