Appearance
flap_utils_m
Source: src/third_party/FLAP/src/lib/flap_utils_m.f90
Dependencies
Contents
- flap_string
- count
- list_items
- list_push
- read_env
- read_line
- tokenize
- split_command_line
- write_text
- csv_split
- count_substring
- to_characters
- list_count
- list_join
- replace
- replace_all
- unique
- upper_case
- fish_escape
- ps_escape
- levenshtein
- suggestions
- wstrip
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
LIST_SEP | character(len=*) | parameter |
Derived Types
flap_string
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
s | character(len=:) | allocatable |
Interfaces
count
Module procedures: count_substring
Subroutines
list_items
Attributes: pure
fortran
subroutine list_items(list, items, n)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
list | character(len=*) | in | ||
items | character(len=:) | out | allocatable | |
n | integer(kind=I4P) | out |
Call graph
list_push
Attributes: pure
fortran
subroutine list_push(list, item)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
list | character(len=:) | inout | allocatable | |
item | character(len=*) | in |
Call graph
read_env
fortran
subroutine read_env(name, value, found, ignore)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | ||
value | character(len=:) | out | allocatable | |
found | logical | out | ||
ignore | logical | in | optional |
Call graph
read_line
fortran
subroutine read_line(lun, line, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lun | integer(kind=I4P) | in | ||
line | character(len=:) | out | allocatable | |
iostat | integer(kind=I4P) | out | ||
iomsg | character(len=*) | out | optional |
Call graph
tokenize
Attributes: pure
fortran
subroutine tokenize(strin, delimiter, toks, Nt)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
strin | character(len=*) | in | ||
delimiter | character(len=*) | in | ||
toks | character(len=len) | out | allocatable | |
Nt | integer(kind=I4P) | out | optional |
Call graph
split_command_line
Attributes: pure
fortran
subroutine split_command_line(strin, toks, Nt)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
strin | character(len=*) | in | ||
toks | character(len=len) | out | allocatable | |
Nt | integer(kind=I4P) | out |
Call graph
write_text
fortran
subroutine write_text(lun, text)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lun | integer(kind=I4P) | in | ||
text | character(len=*) | in |
Call graph
csv_split
Attributes: pure
fortran
subroutine csv_split(record, fields, nf, error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
record | character(len=*) | in | ||
fields | type(flap_string) | out | allocatable | |
nf | integer(kind=I4P) | out | ||
error | integer(kind=I4P) | out |
Call graph
Functions
count_substring
Attributes: elemental
Returns: integer(kind=I4P)
fortran
function count_substring(string, substring) result(No)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
string | character(len=*) | in | ||
substring | character(len=*) | in |
Call graph
to_characters
Attributes: pure
Returns: character(len=:)
fortran
function to_characters(strings) result(chars)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
strings | type(flap_string) | in |
Call graph
list_count
Attributes: pure
Returns: integer(kind=I4P)
fortran
function list_count(list) result(n)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
list | character(len=*) | in |
Call graph
list_join
Attributes: pure
Returns: character(len=:)
fortran
function list_join(list, sep) result(joined)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
list | character(len=*) | in | ||
sep | character(len=*) | in |
Call graph
replace
Attributes: pure
Returns: character(len=:)
fortran
function replace(string, substring, restring) result(newstring)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
string | character(len=*) | in | ||
substring | character(len=*) | in | ||
restring | character(len=*) | in |
replace_all
Attributes: pure
Returns: character(len=:)
fortran
function replace_all(string, substring, restring) result(newstring)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
string | character(len=*) | in | ||
substring | character(len=*) | in | ||
restring | character(len=*) | in |
Call graph
unique
Attributes: elemental
Returns: character(len=len)
fortran
function unique(string, substring) result(uniq)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
string | character(len=*) | in | ||
substring | character(len=*) | in |
Call graph
upper_case
Attributes: elemental
Returns: character(len=len)
fortran
function upper_case(string)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
string | character(len=*) | in |
Call graph
fish_escape
Attributes: pure
Returns: character(len=:)
fortran
function fish_escape(text) result(escaped)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in |
Call graph
ps_escape
Attributes: pure
Returns: character(len=:)
fortran
function ps_escape(text) result(escaped)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in |
Call graph
levenshtein
Attributes: pure
Returns: integer(kind=I4P)
fortran
function levenshtein(a, b) result(d)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | character(len=*) | in | ||
b | character(len=*) | in |
suggestions
Attributes: pure
Returns: character(len=:)
fortran
function suggestions(token, candidates, case_insensitive) result(hint)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
token | character(len=*) | in | ||
candidates | type(flap_string) | in | ||
case_insensitive | logical | in |
Call graph
wstrip
Attributes: pure
Returns: character(len=:)
fortran
function wstrip(string) result(newstring)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
string | character(len=*) | in |
Call graph