flap_utils_m Module

FLAP utils.


Uses

    • penf
  • module~~flap_utils_m~~UsesGraph module~flap_utils_m flap_utils_m penf penf module~flap_utils_m->penf

Used by

  • module~~flap_utils_m~~UsedByGraph module~flap_utils_m flap_utils_m module~flap_command_line_argument_t flap_command_line_argument_t module~flap_command_line_argument_t->module~flap_utils_m module~flap_command_line_interface_t flap_command_line_interface_t module~flap_command_line_interface_t->module~flap_utils_m module~flap_command_line_interface_t->module~flap_command_line_argument_t module~flap_command_line_arguments_group_t flap_command_line_arguments_group_t module~flap_command_line_interface_t->module~flap_command_line_arguments_group_t module~flap flap module~flap->module~flap_command_line_argument_t module~flap->module~flap_command_line_interface_t module~flap->module~flap_command_line_arguments_group_t module~flap_command_line_arguments_group_t->module~flap_command_line_argument_t program~flap_save_bash_completion flap_save_bash_completion program~flap_save_bash_completion->module~flap program~flap_save_man_page flap_save_man_page program~flap_save_man_page->module~flap program~flap_save_usage_to_markdown flap_save_usage_to_markdown program~flap_save_usage_to_markdown->module~flap program~flap_test_action_store flap_test_action_store program~flap_test_action_store->module~flap program~flap_test_ansi_color_style flap_test_ansi_color_style program~flap_test_ansi_color_style->module~flap program~flap_test_basic flap_test_basic program~flap_test_basic->module~flap program~flap_test_choices_logical flap_test_choices_logical program~flap_test_choices_logical->module~flap program~flap_test_duplicated_clas flap_test_duplicated_clas program~flap_test_duplicated_clas->module~flap program~flap_test_group flap_test_group program~flap_test_group->module~flap program~flap_test_group_examples flap_test_group_examples program~flap_test_group_examples->module~flap program~flap_test_hidden flap_test_hidden program~flap_test_hidden->module~flap program~flap_test_ignore_unknown_clas flap_test_ignore_unknown_clas program~flap_test_ignore_unknown_clas->module~flap program~flap_test_minimal flap_test_minimal program~flap_test_minimal->module~flap program~flap_test_nargs_insufficient flap_test_nargs_insufficient program~flap_test_nargs_insufficient->module~flap program~flap_test_nargs_insufficient~2 flap_test_nargs_insufficient program~flap_test_nargs_insufficient~2->module~flap program~flap_test_nested flap_test_nested program~flap_test_nested->module~flap program~flap_test_string flap_test_string program~flap_test_string->module~flap

Interfaces

public interface count

Overload intrinsic function count for counting substring occurences into strings.

  • private elemental function count_substring(string, substring) result(No)

    Count the number of occurences of a substring into a string.

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: string

    String.

    character(len=*), intent(in) :: substring

    Substring.

    Return Value integer(kind=I4P)

    Number of occurrences.


Functions

private elemental function count_substring(string, substring) result(No)

Count the number of occurences of a substring into a string.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string

String.

character(len=*), intent(in) :: substring

Substring.

Return Value integer(kind=I4P)

Number of occurrences.

public pure function replace(string, substring, restring) result(newstring)

Replace substring (only first occurrence) into a string.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string

String to be modified.

character(len=*), intent(in) :: substring

Substring to be replaced.

character(len=*), intent(in) :: restring

String to be inserted.

Return Value character(len=:), allocatable

New modified string.

public pure function replace_all(string, substring, restring) result(newstring)

Replace substring (all occurrences) into a string.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string

String to be modified.

character(len=*), intent(in) :: substring

Substring to be replaced.

character(len=*), intent(in) :: restring

String to be inserted.

Return Value character(len=:), allocatable

New modified string.

public elemental function unique(string, substring) result(uniq)

Reduce to one (unique) multiple (sequential) occurrences of a characters substring into a string.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string

String to be parsed.

character(len=*), intent(in) :: substring

Substring which multiple occurences must be reduced to one.

Return Value character(len=len)

String parsed.

public elemental function upper_case(string)

Convert the lower case characters of a string to upper case one.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string

String to be converted.

Return Value character(len=len)

Converted string.

public pure function wstrip(string) result(newstring)

Strip out leading and trailing white spaces from a string.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string

String to be modified.

Return Value character(len=:), allocatable

New modified string.


Subroutines

public pure subroutine tokenize(strin, delimiter, toks, Nt)

Tokenize a string in order to parse it.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: strin

String to be tokenized.

character(len=*), intent(in) :: delimiter

Delimiter of tokens.

character(len=len), intent(out), allocatable :: toks(:)

Tokens.

integer(kind=I4P), intent(out), optional :: Nt

Number of tokens.