modulefdoc_util
String, date and path helpers shared by the rest of fdoc.
Uses
- iso_fortran_env
- ffmt_strings
- ffmt_fs
- ffmt_io
Graphs
Uses
Used by
Variables
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| WHITESPACE | character(len=*) | privateparameter | ''//achar(9)//achar(10)//achar(11)//achar(12)//achar(13) |
Types
name_index_t
A hash table from names to positive integers, for lookups in long lists.
Functions
closing_parenpure
Position of the ) matching the ( at open in s, skipping strings, or 0.
day_of_yearpureprivate
Day of the year of a date, from 1.
expand_vars
path with $NAME and ${NAME} replaced by environment variables. Unset variables are left
as written.
has_drivepureprivate
True if path starts with a drive letter, as in C:.
index_findpure
The value of name in table, or 0.
joinpure
The strings of list with sep between them.
joined_lengthpureprivate
Length of the result of join.
last_separatorpure
The position of the last separator in path, / or \, or 0.
lexical_cleanprivate
Remove empty, . and .. components from absolute path.
name_hashpureprivate
The hash of name, FNV-1a, as a position in 1:size, where size is a power of 2.
remove_blankspure
s without blanks and tabs.
resolve_path
The absolute form of path relative to directory base, with variables expanded and . and ..
removed, and with / as the separator on paths with a drive letter. Links are left as they are, and
the path does not have to exist.
split_lines
The lines of text, ended by LF, CRLF or CR. As in Python's splitlines, a final line ending
does not start another line.
split_on
The parts of text between the characters sep, including empty ones.
split_words
The blank-separated words of text.
starts_wordpure
True if s starts with word word: followed by anything but a letter, digit or _.
strftime
The current local time in a strftime format.
strippure
s without leading and trailing whitespace.
stripped_lengthpureprivate
Length of s without leading and trailing whitespace.
top_indexpure
Position of the first pattern in s outside brackets and strings, or 0.
top_split
The parts of s between the characters sep outside brackets and strings, each stripped.
word_atpure
True if whole word word is at position at of s.
Subroutines
digits_valuepure
The value of text, without an internal read, as those take a lock.
lower_in_placepure
Make text lowercase, without a temporary, for text too long for the stack of a thread.
read_whole_file
Read all of file path. This can be called from parallel code, as all file I/O of threads has to
take turns: libgfortran 16 can crash otherwise (see example/io_race.f90).
remove_file
Delete file path, if it can be. This can be called from parallel code.
unique_tag
A number, as text, that another run at the same time is very unlikely to get, for temporary names.
write_whole_file
Replace the contents of file path. This can be called from parallel code.