Module doh::util
[−]
[src]
Module containing various utility functions.
Structs
RaiiGuard |
A RAII guard object, calling a function when it's created and when it's destroyed. |
TAB_SPACING |
Filler to replace tabs with of length |
Constants
GETCH_ARROW_DOWN |
Second byte returned by |
GETCH_ARROW_LEFT |
Second byte returned by |
GETCH_ARROW_RIGHT |
Second byte returned by |
GETCH_ARROW_UP |
Second byte returned by |
GETCH_DELETE |
Second byte returned by |
GETCH_END |
Second byte returned by |
GETCH_ENTER |
Byte returned by |
GETCH_ESC |
Byte returned by |
GETCH_HOME |
Second byte returned by |
GETCH_PAGE_DOWN |
Second byte returned by |
GETCH_PAGE_UP |
Second byte returned by |
GETCH_SPECIAL_PREFIX |
First byte returned by |
TAB_WIDTH |
Amount of spaces to expand tabs to. |
Statics
USER_AGENT |
App name and version to use with User-Agent request header. |
Functions
human_readable_size |
Construct string representing a human-readable size. |
max_listing_lines |
Get max amount of listed elements per page, based on term height |
parent_url |
Get a URL that is canonically considered a "parent" to the specified one, or the specified URL if it is a root URL. |
parse_rfc3339 |
Parse an RFC3339 string into a timespec. |
percent_decode |
Decode a percent-encoded string (like a part of a URL). |