stringifor Module

module~~stringifor~~UsesGraph module~stringifor stringifor module~penf penf module~penf->module~stringifor module~stringifor_string_t stringifor_string_t module~penf->module~stringifor_string_t module~befor64 befor64 module~penf->module~befor64 module~befor64_pack_data_m befor64_pack_data_m module~penf->module~befor64_pack_data_m module~stringifor_string_t->module~stringifor module~penf_global_parameters_variables penf_global_parameters_variables module~penf_global_parameters_variables->module~penf module~penf_b_size penf_b_size module~penf_global_parameters_variables->module~penf_b_size module~penf_stringify penf_stringify module~penf_global_parameters_variables->module~penf_stringify module~penf_b_size->module~penf module~penf_b_size->module~penf_stringify module~penf_stringify->module~penf iso_fortran_env iso_fortran_env iso_fortran_env->module~penf_stringify module~befor64->module~stringifor_string_t module~befor64_pack_data_m->module~befor64
Help

StringiFor, Strings Fortran, yet another stringify Fortran module

Used By

module~~stringifor~~UsedByGraph module~stringifor stringifor module~foxy_xml_tag foxy_xml_tag module~stringifor->module~foxy_xml_tag module~foxy_xml_file foxy_xml_file module~foxy_xml_tag->module~foxy_xml_file module~foxy foxy module~foxy_xml_tag->module~foxy module~foxy_xml_file->module~foxy program~parse_file_simple parse_file_simple module~foxy->program~parse_file_simple program~create_tag create_tag module~foxy->program~create_tag program~add_attributes add_attributes module~foxy->program~add_attributes program~delete_attributes delete_attributes module~foxy->program~delete_attributes program~parse_string_simple parse_string_simple module~foxy->program~parse_string_simple program~indent_tag indent_tag module~foxy->program~indent_tag program~delete_content delete_content module~foxy->program~delete_content program~add_tag add_tag module~foxy->program~add_tag program~delete_tag delete_tag module~foxy->program~delete_tag program~write_tag write_tag module~foxy->program~write_tag
Help

Interfaces

public interface adjustl

Builtin adjustl overloading.

  • public pure function sadjustl_character(self) result(adjusted)

    Arguments

    Type IntentOptional AttributesName
    class(string), intent(in) :: self

    The string.

    Return Value character(kind=CK,len=len(self%raw))

    Adjusted string.

    Description

    Left adjust a string by removing leading spaces (character output).

public interface adjustr

Builtin adjustr overloading.

  • public pure function sadjustr_character(self) result(adjusted)

    Arguments

    Type IntentOptional AttributesName
    class(string), intent(in) :: self

    The string.

    Return Value character(kind=CK,len=len(self%raw))

    Adjusted string.

    Description

    Right adjust a string by removing leading spaces (character output).

public interface count

Builtin count overloading.

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

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: string_

    String.

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

    Substring.

    Return Value integer(kind=I4P)

    Number of occurrences.

    Description

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

public interface index

Builtin index overloading.

  • public elemental function sindex_string_string(self, substring, back) result(i)

    Arguments

    Type IntentOptional AttributesName
    class(string), intent(in) :: self

    The string.

    type(string), intent(in) :: substring

    Searched substring.

    logical, intent(in), optional :: back

    Start of the last occurrence rather than the first.

    Return Value integer

    Result of the search.

    Description

    Return the position of the start of the first occurrence of string substring as a substring in string, counting from one. If substring is not present in string, zero is returned. If the back argument is present and true, the return value is the start of the last occurrence rather than the first.

  • public elemental function sindex_string_character(self, substring, back) result(i)

    Arguments

    Type IntentOptional AttributesName
    class(string), intent(in) :: self

    The string.

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

    Searched substring.

    logical, intent(in), optional :: back

    Start of the last occurrence rather than the first.

    Return Value integer

    Result of the search.

    Description

    Return the position of the start of the first occurrence of string substring as a substring in string, counting from one. If substring is not present in string, zero is returned. If the back argument is present and true, the return value is the start of the last occurrence rather than the first.

  • public elemental function sindex_character_string(string_, substring, back) result(i)

    Arguments

    Type IntentOptional AttributesName
    character(kind=CK,len=*), intent(in) :: string_

    The string.

    type(string), intent(in) :: substring

    Searched substring.

    logical, intent(in), optional :: back

    Start of the last occurrence rather than the first.

    Return Value integer

    Result of the search.

    Description

    Return the position of the start of the first occurrence of string substring as a substring in string, counting from one. If substring is not present in string, zero is returned. If the back argument is present and true, the return value is the start of the last occurrence rather than the first.

public interface len

Builtin len overloading.

  • public elemental function slen(self) result(l)

    Arguments

    Type IntentOptional AttributesName
    class(string), intent(in) :: self

    The string.

    Return Value integer

    String length.

    Description

    Return the length of a string.

public interface len_trim

Builtin len_trim overloading.

  • public elemental function slen_trim(self) result(l)

    Arguments

    Type IntentOptional AttributesName
    class(string), intent(in) :: self

    The string.

    Return Value integer

    String length.

    Description

    Return the length of a string, ignoring any trailing blanks.

public interface repeat

Builtin repeat overloading.

  • public elemental function srepeat_string_string(self, ncopies) result(repeated)

    Arguments

    Type IntentOptional AttributesName
    class(string), intent(in) :: self

    String to be repeated.

    integer, intent(in) :: ncopies

    Number of string copies.

    Return Value type(string)

    Repeated string.

    Description

    Concatenates several copies of an input string.

public interface scan

Builtin scan overloading.

  • public elemental function sscan_string_string(self, set, back) result(i)

    Arguments

    Type IntentOptional AttributesName
    class(string), intent(in) :: self

    The string.

    type(string), intent(in) :: set

    Searched set.

    logical, intent(in), optional :: back

    Start of the last occurrence rather than the first.

    Return Value integer

    Result of the search.

    Description

    Return the leftmost (if back is either absent or equals false, otherwise the rightmost) character of string that is in set.

  • public elemental function sscan_string_character(self, set, back) result(i)

    Arguments

    Type IntentOptional AttributesName
    class(string), intent(in) :: self

    The string.

    character(kind=CK,len=*), intent(in) :: set

    Searched set.

    logical, intent(in), optional :: back

    Start of the last occurrence rather than the first.

    Return Value integer

    Result of the search.

    Description

    Return the leftmost (if back is either absent or equals false, otherwise the rightmost) character of string that is in set.

  • public elemental function sscan_character_string(sstring, set, back) result(i)

    Arguments

    Type IntentOptional AttributesName
    character(kind=CK,len=*), intent(in) :: sstring

    The string.

    type(string), intent(in) :: set

    Searched set.

    logical, intent(in), optional :: back

    Start of the last occurrence rather than the first.

    Return Value integer

    Result of the search.

    Description

    Return the leftmost (if back is either absent or equals false, otherwise the rightmost) character of string that is in set.

public interface trim

Builtin trim overloading.

  • public elemental function strim(self) result(trimmed)

    Arguments

    Type IntentOptional AttributesName
    class(string), intent(in) :: self

    The string.

    Return Value type(string)

    Trimmed string.

    Description

    Remove leading spaces.


Functions

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

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: string_

String.

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

Substring.

Return Value integer(kind=I4P)

Number of occurrences.

Description

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


Subroutines

public subroutine read_file(file, lines, form, iostat, iomsg)

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: file

File name.

type(string), intent(out), allocatable:: lines(:)

The lines.

character(len=*), intent(in), optional :: form

Format of unit.

integer, intent(out), optional :: iostat

IO status code.

character(len=*), intent(inout), optional :: iomsg

IO status message.

Description

Read a file as a single string stream.

public subroutine read_lines(unit, lines, form, iostat, iomsg)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: unit

Logical unit.

type(string), intent(out), allocatable:: lines(:)

The lines.

character(len=*), intent(in), optional :: form

Format of unit.

integer, intent(out), optional :: iostat

IO status code.

character(len=*), intent(inout), optional :: iomsg

IO status message.

Description

Read lines (records) from a connected-formatted unit.

public subroutine write_lines(unit, lines, form, iostat, iomsg)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: unit

Logical unit.

type(string), intent(in) :: lines(1:)

The lines.

character(len=*), intent(in), optional :: form

Format of unit.

integer, intent(out), optional :: iostat

IO status code.

character(len=*), intent(inout), optional :: iomsg

IO status message.

Description

Write lines (records) to a connected-formatted unit.

public subroutine write_file(file, lines, form, iostat, iomsg)

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: file

File name.

type(string), intent(in) :: lines(1:)

The lines.

character(len=*), intent(in), optional :: form

Format of unit.

integer, intent(out), optional :: iostat

IO status code.

character(len=*), intent(inout), optional :: iomsg

IO status message.

Description

Write a single string stream into file.