Last active
April 2, 2024 15:04
-
-
Save gabrielbarros/03b16405dd21ca47f0a139704c7840e4 to your computer and use it in GitHub Desktop.
Box drawing - Draw a table with unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UNICODE BOX DRAWING CHARACTERS | |
┌ ─ ─ ─ ┬ ─ ─ ─ ┐ ╭ ─ ─ ─ ┬ ─ ─ ─ ╮ | |
│ a │ b │ │ a │ b │ | |
├ ─ ─ ─ ┼ ─ ─ ─ ┤ ├ ─ ─ ─ ┼ ─ ─ ─ ┤ | |
│ c │ d │ │ c │ d │ | |
└ ─ ─ ─ ┴ ─ ─ ─ ┘ ╰ ─ ─ ─ ┴ ─ ─ ─ ╯ | |
↓ ↓ | |
┌───┬───┐ ╭───┬───╮ | |
│ a │ b │ │ a │ b │ | |
├───┼───┤ ├───┼───┤ | |
│ c │ d │ │ c │ d │ | |
└───┴───┘ ╰───┴───╯ | |
Examples: | |
┌─────────┐ | |
│ Name │ | |
├─────────┤ | |
│ John │ | |
├─────────┤ | |
│ Karen │ | |
├─────────┤ | |
│ Michael │ | |
└─────────┘ | |
┌─────────┬─────┬────────────┐ | |
│ Name │ Age │ Profession │ | |
├─────────┼─────┼────────────┤ | |
│ John │ 26 │ architect │ | |
└─────────┴─────┴────────────┘ | |
┌─────────┬─────┬────────────┐ | |
│ Name │ Age │ Profession │ | |
├─────────┼─────┼────────────┤ | |
│ John │ 26 │ architect │ | |
├─────────┼─────┼────────────┤ | |
│ Karen │ 19 │ nurse │ | |
├─────────┼─────┼────────────┤ | |
│ Michael │ 37 │ lawyer │ | |
└─────────┴─────┴────────────┘ | |
Tree: | |
test | |
├── deep | |
│ └── test.txt | |
└── lorem.txt | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment