string Derived Type

type, public :: string


Inherited by

type~~string~~InheritedByGraph type~string string type~xml_writer_abstract xml_writer_abstract type~xml_writer_abstract->type~string format_ch, topology, xml_volatile type~xml_tag xml_tag type~xml_writer_abstract->type~xml_tag tag type~xml_tag->type~string tag_name, tag_content, attribute type~xml_writer_appended xml_writer_appended type~xml_writer_appended->type~string encoding type~xml_writer_appended->type~xml_writer_abstract type~pvtk_file pvtk_file type~pvtk_file->type~xml_writer_abstract xml_writer type~xml_writer_ascii_local xml_writer_ascii_local type~xml_writer_ascii_local->type~xml_writer_abstract type~xml_file xml_file type~xml_file->type~xml_tag tag type~vtk_file vtk_file type~vtk_file->type~xml_writer_abstract xml_writer type~xml_writer_binary_local xml_writer_binary_local type~xml_writer_binary_local->type~xml_writer_abstract type~vtm_file vtm_file type~vtm_file->type~xml_writer_abstract xml_writer

Contents

adjustl adjustr count index len len_trim repeat scan trim verify basedir basename camelcase capitalize chars colorize decode encode escape extension fill free glob insert join strjoin lower partition read_file read_line read_lines replace reverse search slice snakecase split split_chunked startcase strip swapcase tempname to_number unescape unique upper write_file write_line write_lines end_with is_allocated is_digit is_integer is_lower is_number is_real is_upper start_with assignment(=) operator(//) operator(.cat.) operator(==) operator(/=) operator(<) operator(<=) operator(>=) operator(>) read(formatted) write(formatted) read(unformatted) write(unformatted) sindex_string_string sindex_string_character srepeat_string_string srepeat_character_string sscan_string_string sscan_string_character sverify_string_string sverify_string_character colorize_str glob_character glob_string insert_string insert_character join_strings join_characters strjoin_strings strjoin_characters to_integer_I1P to_integer_I2P to_integer_I4P to_integer_I8P to_real_R4P to_real_R8P to_real_R16P string_assign_string string_assign_character string_assign_integer_I1P string_assign_integer_I2P string_assign_integer_I4P string_assign_integer_I8P string_assign_real_R4P string_assign_real_R8P string_assign_real_R16P string_concat_string string_concat_character character_concat_string string_concat_string_string string_concat_character_string character_concat_string_string string_eq_string string_eq_character character_eq_string string_ne_string string_ne_character character_ne_string string_lt_string string_lt_character character_lt_string string_le_string string_le_character character_le_string string_ge_string string_ge_character character_ge_string string_gt_string string_gt_character character_gt_string read_formatted read_delimited read_undelimited read_undelimited_listdirected write_formatted read_unformatted write_unformatted replace_one_occurrence

Source Code


Components

TypeVisibilityAttributesNameInitial
character(kind=CK,len=:), public, allocatable:: raw

Type-Bound Procedures

procedure, public, pass(self) :: adjustl => sadjustl

  • private elemental function sadjustl(self) result(adjusted)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value type(string)

procedure, public, pass(self) :: adjustr => sadjustr

  • private elemental function sadjustr(self) result(adjusted)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value type(string)

procedure, public, pass(self) :: count => scount

  • private elemental function scount(self, substring, ignore_isolated) result(No)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character, intent(in) :: substring
    logical, intent(in), optional :: ignore_isolated

    Return Value integer

generic, public :: index => sindex_string_string, sindex_string_character

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    type(string), intent(in) :: substring
    logical, intent(in), optional :: back

    Return Value integer

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: substring
    logical, intent(in), optional :: back

    Return Value integer

procedure, public, pass(self) :: len => slen

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value integer

procedure, public, pass(self) :: len_trim => slen_trim

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value integer

generic, public :: repeat => srepeat_string_string, srepeat_character_string

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer, intent(in) :: ncopies

    Return Value type(string)

  • private elemental function srepeat_character_string(rstring, ncopies) result(repeated)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: rstring
    integer, intent(in) :: ncopies

    Return Value type(string)

generic, public :: scan => sscan_string_string, sscan_string_character

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    type(string), intent(in) :: set
    logical, intent(in), optional :: back

    Return Value integer

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: set
    logical, intent(in), optional :: back

    Return Value integer

procedure, public, pass(self) :: trim => strim

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value type(string)

generic, public :: verify => sverify_string_string, sverify_string_character

  • private elemental function sverify_string_string(self, set, back) result(i)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    type(string), intent(in) :: set
    logical, intent(in), optional :: back

    Return Value integer

  • private elemental function sverify_string_character(self, set, back) result(i)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: set
    logical, intent(in), optional :: back

    Return Value integer

procedure, public, pass(self) :: basedir

  • private elemental function basedir(self, sep)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in), optional :: sep

    Return Value type(string)

procedure, public, pass(self) :: basename

  • private elemental function basename(self, sep, extension, strip_last_extension)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in), optional :: sep
    character(kind=CK,len=*), intent(in), optional :: extension
    logical, intent(in), optional :: strip_last_extension

    Return Value type(string)

procedure, public, pass(self) :: camelcase

  • private elemental function camelcase(self, sep)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in), optional :: sep

    Return Value type(string)

procedure, public, pass(self) :: capitalize

  • private elemental function capitalize(self) result(capitalized)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value type(string)

procedure, public, pass(self) :: chars

  • private pure function chars(self) result(raw)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value character(kind=CK,len=:),allocatable

generic, public :: colorize => colorize_str

  • private pure function colorize_str(self, color_fg, color_bg, style) result(colorized)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(len=*), intent(in), optional :: color_fg
    character(len=*), intent(in), optional :: color_bg
    character(len=*), intent(in), optional :: style

    Return Value character(len=:),allocatable

procedure, public, pass(self) :: decode

  • private elemental function decode(self, codec) result(decoded)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: codec

    Return Value type(string)

procedure, public, pass(self) :: encode

  • private elemental function encode(self, codec) result(encoded)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: codec

    Return Value type(string)

procedure, public, pass(self) :: escape

  • private elemental function escape(self, to_escape, esc) result(escaped)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=1), intent(in) :: to_escape
    character(kind=CK,len=*), intent(in), optional :: esc

    Return Value type(string)

procedure, public, pass(self) :: extension

  • private elemental function extension(self)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value type(string)

procedure, public, pass(self) :: fill

  • private elemental function fill(self, width, right, filling_char) result(filled)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer, intent(in) :: width
    logical, intent(in), optional :: right
    character(kind=CK,len=1), intent(in), optional :: filling_char

    Return Value type(string)

procedure, public, pass(self) :: free

  • private elemental subroutine free(self)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: self

generic, public :: glob => glob_character, glob_string

  • private subroutine glob_character(self, pattern, list)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character, intent(in) :: pattern
    character(len=:), intent(out), allocatable:: list(:)
  • private subroutine glob_string(self, pattern, list)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character, intent(in) :: pattern
    type(string), intent(out), allocatable:: list(:)

generic, public :: insert => insert_string, insert_character

  • private elemental function insert_string(self, substring, pos) result(inserted)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    type(string), intent(in) :: substring
    integer, intent(in) :: pos

    Return Value type(string)

  • private elemental function insert_character(self, substring, pos) result(inserted)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(len=*), intent(in) :: substring
    integer, intent(in) :: pos

    Return Value type(string)

generic, public :: join => join_strings, join_characters

  • private pure function join_strings(self, array, sep) result(join)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    type(string), intent(in) :: array(1:)
    character(kind=CK,len=*), intent(in), optional :: sep

    Return Value type(string)

  • private pure function join_characters(self, array, sep) result(join)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: array(1:)
    character(kind=CK,len=*), intent(in), optional :: sep

    Return Value type(string)

generic, public :: strjoin => strjoin_strings, strjoin_characters

  • private pure function strjoin_strings(array, sep) result(join)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: array(1:)
    character(kind=CK,len=*), intent(in), optional :: sep

    Return Value type(string)

  • private pure function strjoin_characters(array, sep, is_trim) result(join)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: array(1:)
    character(kind=CK,len=*), intent(in), optional :: sep
    logical, intent(in), optional :: is_trim

    Return Value type(string)

procedure, public, pass(self) :: lower

  • private elemental function lower(self)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value type(string)

procedure, public, pass(self) :: partition

  • private pure function partition(self, sep) result(partitions)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in), optional :: sep

    Return Value type(string) (1:3)

procedure, public, pass(self) :: read_file

  • private subroutine read_file(self, file, is_fast, form, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: self
    character(len=*), intent(in) :: file
    logical, intent(in), optional :: is_fast
    character(len=*), intent(in), optional :: form
    integer, intent(out), optional :: iostat
    character(len=*), intent(inout), optional :: iomsg

procedure, public, pass(self) :: read_line

  • private subroutine read_line(self, unit, form, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: self
    integer, intent(in) :: unit
    character(len=*), intent(in), optional :: form
    integer, intent(out), optional :: iostat
    character(len=*), intent(inout), optional :: iomsg

procedure, public, pass(self) :: read_lines

  • private subroutine read_lines(self, unit, form, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: self
    integer, intent(in) :: unit
    character(len=*), intent(in), optional :: form
    integer, intent(out), optional :: iostat
    character(len=*), intent(inout), optional :: iomsg

procedure, public, pass(self) :: replace

  • private elemental function replace(self, old, new, count) result(replaced)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: old
    character(kind=CK,len=*), intent(in) :: new
    integer, intent(in), optional :: count

    Return Value type(string)

procedure, public, pass(self) :: reverse

  • private elemental function reverse(self) result(reversed)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value type(string)

procedure, public, pass(self) :: search

  • private function search(self, tag_start, tag_end, in_string, in_character, istart, iend) result(tag)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: tag_start
    character(kind=CK,len=*), intent(in) :: tag_end
    type(string), intent(in), optional :: in_string
    character(kind=CK,len=*), intent(in), optional :: in_character
    integer, intent(out), optional :: istart
    integer, intent(out), optional :: iend

    Return Value type(string)

procedure, public, pass(self) :: slice

  • private pure function slice(self, istart, iend) result(raw)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer, intent(in) :: istart
    integer, intent(in) :: iend

    Return Value character(kind=CK,len=:),allocatable

procedure, public, pass(self) :: snakecase

  • private elemental function snakecase(self, sep)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in), optional :: sep

    Return Value type(string)

procedure, public, pass(self) :: split

  • private pure subroutine split(self, tokens, sep, max_tokens)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    type(string), intent(out), allocatable:: tokens(:)
    character(kind=CK,len=*), intent(in), optional :: sep
    integer, intent(in), optional :: max_tokens

procedure, public, pass(self) :: split_chunked

  • private pure subroutine split_chunked(self, tokens, chunks, sep)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    type(string), intent(out), allocatable:: tokens(:)
    integer, intent(in) :: chunks
    character(kind=CK,len=*), intent(in), optional :: sep

procedure, public, pass(self) :: startcase

  • private elemental function startcase(self, sep)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in), optional :: sep

    Return Value type(string)

procedure, public, pass(self) :: strip

  • private elemental function strip(self, remove_nulls)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    logical, intent(in), optional :: remove_nulls

    Return Value type(string)

procedure, public, pass(self) :: swapcase

  • private elemental function swapcase(self)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value type(string)

procedure, public, pass(self) :: tempname

  • private function tempname(self, is_file, prefix, path)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    logical, intent(in), optional :: is_file
    character, intent(in), optional :: prefix
    character, intent(in), optional :: path

    Return Value character(len=:),allocatable

  • private elemental function to_integer_I1P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer(kind=I1P), intent(in) :: kind

    Return Value integer(kind=I1P)

  • private elemental function to_integer_I2P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer(kind=I2P), intent(in) :: kind

    Return Value integer(kind=I2P)

  • private elemental function to_integer_I4P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer(kind=I4P), intent(in) :: kind

    Return Value integer(kind=I4P)

  • private elemental function to_integer_I8P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer(kind=I8P), intent(in) :: kind

    Return Value integer(kind=I8P)

  • private elemental function to_real_R8P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    real(kind=R8P), intent(in) :: kind

    Return Value real(kind=R8P)

  • private elemental function to_real_R4P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    real(kind=R4P), intent(in) :: kind

    Return Value real(kind=R4P)

procedure, public, pass(self) :: unescape

  • private elemental function unescape(self, to_unescape, unesc) result(unescaped)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=1), intent(in) :: to_unescape
    character(kind=CK,len=*), intent(in), optional :: unesc

    Return Value type(string)

procedure, public, pass(self) :: unique

  • private elemental function unique(self, substring) result(uniq)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in), optional :: substring

    Return Value type(string)

procedure, public, pass(self) :: upper

  • private elemental function upper(self)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value type(string)

procedure, public, pass(self) :: write_file

  • private subroutine write_file(self, file, form, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(len=*), intent(in) :: file
    character(len=*), intent(in), optional :: form
    integer, intent(out), optional :: iostat
    character(len=*), intent(inout), optional :: iomsg

procedure, public, pass(self) :: write_line

  • private subroutine write_line(self, unit, form, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer, intent(in) :: unit
    character(len=*), intent(in), optional :: form
    integer, intent(out), optional :: iostat
    character(len=*), intent(inout), optional :: iomsg

procedure, public, pass(self) :: write_lines

  • private subroutine write_lines(self, unit, form, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer, intent(in) :: unit
    character(len=*), intent(in), optional :: form
    integer, intent(out), optional :: iostat
    character(len=*), intent(inout), optional :: iomsg

procedure, public, pass(self) :: end_with

  • private elemental function end_with(self, suffix, start, end, ignore_null_eof)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: suffix
    integer, intent(in), optional :: start
    integer, intent(in), optional :: end
    logical, intent(in), optional :: ignore_null_eof

    Return Value logical

procedure, public, pass(self) :: is_allocated

  • private elemental function is_allocated(self)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value logical

procedure, public, pass(self) :: is_digit

  • private elemental function is_digit(self)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value logical

procedure, public, pass(self) :: is_integer

  • private elemental function is_integer(self, allow_spaces)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    logical, intent(in), optional :: allow_spaces

    Return Value logical

procedure, public, pass(self) :: is_lower

  • private elemental function is_lower(self)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value logical

procedure, public, pass(self) :: is_number

  • private elemental function is_number(self, allow_spaces)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    logical, intent(in), optional :: allow_spaces

    Return Value logical

procedure, public, pass(self) :: is_real

  • private elemental function is_real(self, allow_spaces)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    logical, intent(in), optional :: allow_spaces

    Return Value logical

procedure, public, pass(self) :: is_upper

  • private elemental function is_upper(self)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self

    Return Value logical

procedure, public, pass(self) :: start_with

  • private elemental function start_with(self, prefix, start, end)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: prefix
    integer, intent(in), optional :: start
    integer, intent(in), optional :: end

    Return Value logical

  • private pure subroutine string_assign_string(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    type(string), intent(in) :: rhs
  • private pure subroutine string_assign_character(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs
  • private pure subroutine string_assign_integer_I1P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    integer(kind=I1P), intent(in) :: rhs
  • private pure subroutine string_assign_integer_I2P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    integer(kind=I2P), intent(in) :: rhs
  • private pure subroutine string_assign_integer_I4P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    integer(kind=I4P), intent(in) :: rhs
  • private pure subroutine string_assign_integer_I8P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    integer(kind=I8P), intent(in) :: rhs
  • private pure subroutine string_assign_real_R8P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    real(kind=R8P), intent(in) :: rhs
  • private pure subroutine string_assign_real_R4P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    real(kind=R4P), intent(in) :: rhs
  • private pure function string_concat_string(lhs, rhs) result(concat)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value character(kind=CK,len=:),allocatable

  • private pure function string_concat_character(lhs, rhs) result(concat)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value character(kind=CK,len=:),allocatable

  • private pure function character_concat_string(lhs, rhs) result(concat)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value character(kind=CK,len=:),allocatable

  • private elemental function string_concat_string_string(lhs, rhs) result(concat)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value type(string)

  • private elemental function string_concat_character_string(lhs, rhs) result(concat)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value type(string)

  • private elemental function character_concat_string_string(lhs, rhs) result(concat)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value type(string)

generic, public :: operator(==) => string_eq_string, string_eq_character, character_eq_string

  • private elemental function string_eq_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value logical

  • private elemental function string_eq_character(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value logical

  • private elemental function character_eq_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value logical

generic, public :: operator(/=) => string_ne_string, string_ne_character, character_ne_string

  • private elemental function string_ne_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value logical

  • private elemental function string_ne_character(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value logical

  • private elemental function character_ne_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value logical

generic, public :: operator(<) => string_lt_string, string_lt_character, character_lt_string

  • private elemental function string_lt_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value logical

  • private elemental function string_lt_character(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value logical

  • private elemental function character_lt_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value logical

generic, public :: operator(<=) => string_le_string, string_le_character, character_le_string

  • private elemental function string_le_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value logical

  • private elemental function string_le_character(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value logical

  • private elemental function character_le_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value logical

generic, public :: operator(>=) => string_ge_string, string_ge_character, character_ge_string

  • private elemental function string_ge_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value logical

  • private elemental function string_ge_character(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value logical

  • private elemental function character_ge_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value logical

generic, public :: operator(>) => string_gt_string, string_gt_character, character_gt_string

  • private elemental function string_gt_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value logical

  • private elemental function string_gt_character(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value logical

  • private elemental function character_gt_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value logical

generic, public :: read(formatted) => read_formatted

  • private subroutine read_formatted(dtv, unit, iotype, v_list, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: dtv
    integer, intent(in) :: unit
    character(len=*), intent(in) :: iotype
    integer, intent(in) :: v_list(:)
    integer, intent(out) :: iostat
    character(len=*), intent(inout) :: iomsg

generic, public :: write(formatted) => write_formatted

  • private subroutine write_formatted(dtv, unit, iotype, v_list, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: dtv
    integer, intent(in) :: unit
    character(kind=CK,len=*), intent(in) :: iotype
    integer, intent(in) :: v_list(:)
    integer, intent(out) :: iostat
    character(kind=CK,len=*), intent(inout) :: iomsg

generic, public :: read(unformatted) => read_unformatted

  • private subroutine read_unformatted(dtv, unit, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: dtv
    integer, intent(in) :: unit
    integer, intent(out) :: iostat
    character(kind=CK,len=*), intent(inout) :: iomsg

generic, public :: write(unformatted) => write_unformatted

  • private subroutine write_unformatted(dtv, unit, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: dtv
    integer, intent(in) :: unit
    integer, intent(out) :: iostat
    character(kind=CK,len=*), intent(inout) :: iomsg

procedure, private, pass(self) :: sindex_string_string

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    type(string), intent(in) :: substring
    logical, intent(in), optional :: back

    Return Value integer

procedure, private, pass(self) :: sindex_string_character

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: substring
    logical, intent(in), optional :: back

    Return Value integer

procedure, private, pass(self) :: srepeat_string_string

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer, intent(in) :: ncopies

    Return Value type(string)

procedure, private, nopass :: srepeat_character_string

  • private elemental function srepeat_character_string(rstring, ncopies) result(repeated)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: rstring
    integer, intent(in) :: ncopies

    Return Value type(string)

procedure, private, pass(self) :: sscan_string_string

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    type(string), intent(in) :: set
    logical, intent(in), optional :: back

    Return Value integer

procedure, private, pass(self) :: sscan_string_character

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

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: set
    logical, intent(in), optional :: back

    Return Value integer

procedure, private, pass(self) :: sverify_string_string

  • private elemental function sverify_string_string(self, set, back) result(i)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    type(string), intent(in) :: set
    logical, intent(in), optional :: back

    Return Value integer

procedure, private, pass(self) :: sverify_string_character

  • private elemental function sverify_string_character(self, set, back) result(i)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: set
    logical, intent(in), optional :: back

    Return Value integer

procedure, private, pass(self) :: colorize_str

  • private pure function colorize_str(self, color_fg, color_bg, style) result(colorized)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(len=*), intent(in), optional :: color_fg
    character(len=*), intent(in), optional :: color_bg
    character(len=*), intent(in), optional :: style

    Return Value character(len=:),allocatable

procedure, private, pass(self) :: glob_character

  • private subroutine glob_character(self, pattern, list)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character, intent(in) :: pattern
    character(len=:), intent(out), allocatable:: list(:)

procedure, private, pass(self) :: glob_string

  • private subroutine glob_string(self, pattern, list)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character, intent(in) :: pattern
    type(string), intent(out), allocatable:: list(:)

procedure, private, pass(self) :: insert_string

  • private elemental function insert_string(self, substring, pos) result(inserted)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    type(string), intent(in) :: substring
    integer, intent(in) :: pos

    Return Value type(string)

procedure, private, pass(self) :: insert_character

  • private elemental function insert_character(self, substring, pos) result(inserted)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(len=*), intent(in) :: substring
    integer, intent(in) :: pos

    Return Value type(string)

procedure, private, pass(self) :: join_strings

  • private pure function join_strings(self, array, sep) result(join)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    type(string), intent(in) :: array(1:)
    character(kind=CK,len=*), intent(in), optional :: sep

    Return Value type(string)

procedure, private, pass(self) :: join_characters

  • private pure function join_characters(self, array, sep) result(join)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: array(1:)
    character(kind=CK,len=*), intent(in), optional :: sep

    Return Value type(string)

procedure, private, nopass :: strjoin_strings

  • private pure function strjoin_strings(array, sep) result(join)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: array(1:)
    character(kind=CK,len=*), intent(in), optional :: sep

    Return Value type(string)

procedure, private, nopass :: strjoin_characters

  • private pure function strjoin_characters(array, sep, is_trim) result(join)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: array(1:)
    character(kind=CK,len=*), intent(in), optional :: sep
    logical, intent(in), optional :: is_trim

    Return Value type(string)

procedure, private, pass(self) :: to_integer_I1P

  • private elemental function to_integer_I1P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer(kind=I1P), intent(in) :: kind

    Return Value integer(kind=I1P)

procedure, private, pass(self) :: to_integer_I2P

  • private elemental function to_integer_I2P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer(kind=I2P), intent(in) :: kind

    Return Value integer(kind=I2P)

procedure, private, pass(self) :: to_integer_I4P

  • private elemental function to_integer_I4P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer(kind=I4P), intent(in) :: kind

    Return Value integer(kind=I4P)

procedure, private, pass(self) :: to_integer_I8P

  • private elemental function to_integer_I8P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    integer(kind=I8P), intent(in) :: kind

    Return Value integer(kind=I8P)

procedure, private, pass(self) :: to_real_R4P

  • private elemental function to_real_R4P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    real(kind=R4P), intent(in) :: kind

    Return Value real(kind=R4P)

procedure, private, pass(self) :: to_real_R8P

  • private elemental function to_real_R8P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    real(kind=R8P), intent(in) :: kind

    Return Value real(kind=R8P)

procedure, private, pass(self) :: to_real_R16P

  • private elemental function to_real_R16P(self, kind) result(to_number)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    real(kind=R16P), intent(in) :: kind

    Return Value real(kind=R16P)

procedure, private, pass(lhs) :: string_assign_string

  • private pure subroutine string_assign_string(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    type(string), intent(in) :: rhs

procedure, private, pass(lhs) :: string_assign_character

  • private pure subroutine string_assign_character(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

procedure, private, pass(lhs) :: string_assign_integer_I1P

  • private pure subroutine string_assign_integer_I1P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    integer(kind=I1P), intent(in) :: rhs

procedure, private, pass(lhs) :: string_assign_integer_I2P

  • private pure subroutine string_assign_integer_I2P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    integer(kind=I2P), intent(in) :: rhs

procedure, private, pass(lhs) :: string_assign_integer_I4P

  • private pure subroutine string_assign_integer_I4P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    integer(kind=I4P), intent(in) :: rhs

procedure, private, pass(lhs) :: string_assign_integer_I8P

  • private pure subroutine string_assign_integer_I8P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    integer(kind=I8P), intent(in) :: rhs

procedure, private, pass(lhs) :: string_assign_real_R4P

  • private pure subroutine string_assign_real_R4P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    real(kind=R4P), intent(in) :: rhs

procedure, private, pass(lhs) :: string_assign_real_R8P

  • private pure subroutine string_assign_real_R8P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    real(kind=R8P), intent(in) :: rhs

procedure, private, pass(lhs) :: string_assign_real_R16P

  • private pure subroutine string_assign_real_R16P(lhs, rhs)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: lhs
    real(kind=R16P), intent(in) :: rhs

procedure, private, pass(lhs) :: string_concat_string

  • private pure function string_concat_string(lhs, rhs) result(concat)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value character(kind=CK,len=:),allocatable

procedure, private, pass(lhs) :: string_concat_character

  • private pure function string_concat_character(lhs, rhs) result(concat)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value character(kind=CK,len=:),allocatable

procedure, private, pass(rhs) :: character_concat_string

  • private pure function character_concat_string(lhs, rhs) result(concat)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value character(kind=CK,len=:),allocatable

procedure, private, pass(lhs) :: string_concat_string_string

procedure, private, pass(lhs) :: string_concat_character_string

  • private elemental function string_concat_character_string(lhs, rhs) result(concat)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value type(string)

procedure, private, pass(rhs) :: character_concat_string_string

  • private elemental function character_concat_string_string(lhs, rhs) result(concat)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value type(string)

procedure, private, pass(lhs) :: string_eq_string

  • private elemental function string_eq_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value logical

procedure, private, pass(lhs) :: string_eq_character

  • private elemental function string_eq_character(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value logical

procedure, private, pass(rhs) :: character_eq_string

  • private elemental function character_eq_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value logical

procedure, private, pass(lhs) :: string_ne_string

  • private elemental function string_ne_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value logical

procedure, private, pass(lhs) :: string_ne_character

  • private elemental function string_ne_character(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value logical

procedure, private, pass(rhs) :: character_ne_string

  • private elemental function character_ne_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value logical

procedure, private, pass(lhs) :: string_lt_string

  • private elemental function string_lt_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value logical

procedure, private, pass(lhs) :: string_lt_character

  • private elemental function string_lt_character(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value logical

procedure, private, pass(rhs) :: character_lt_string

  • private elemental function character_lt_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value logical

procedure, private, pass(lhs) :: string_le_string

  • private elemental function string_le_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value logical

procedure, private, pass(lhs) :: string_le_character

  • private elemental function string_le_character(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value logical

procedure, private, pass(rhs) :: character_le_string

  • private elemental function character_le_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value logical

procedure, private, pass(lhs) :: string_ge_string

  • private elemental function string_ge_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value logical

procedure, private, pass(lhs) :: string_ge_character

  • private elemental function string_ge_character(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value logical

procedure, private, pass(rhs) :: character_ge_string

  • private elemental function character_ge_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value logical

procedure, private, pass(lhs) :: string_gt_string

  • private elemental function string_gt_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    type(string), intent(in) :: rhs

    Return Value logical

procedure, private, pass(lhs) :: string_gt_character

  • private elemental function string_gt_character(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: lhs
    character(kind=CK,len=*), intent(in) :: rhs

    Return Value logical

procedure, private, pass(rhs) :: character_gt_string

  • private elemental function character_gt_string(lhs, rhs) result(is_it)

    Arguments

    TypeIntentOptionalAttributesName
    character(kind=CK,len=*), intent(in) :: lhs
    class(string), intent(in) :: rhs

    Return Value logical

procedure, private, pass(dtv) :: read_formatted

  • private subroutine read_formatted(dtv, unit, iotype, v_list, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: dtv
    integer, intent(in) :: unit
    character(len=*), intent(in) :: iotype
    integer, intent(in) :: v_list(:)
    integer, intent(out) :: iostat
    character(len=*), intent(inout) :: iomsg

procedure, private, pass(dtv) :: read_delimited

  • private subroutine read_delimited(dtv, unit, delim, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(out) :: dtv
    integer, intent(in) :: unit
    character(kind=CK,len=1), intent(in) :: delim
    integer, intent(out) :: iostat
    character(kind=CK,len=*), intent(inout) :: iomsg

procedure, private, pass(dtv) :: read_undelimited

  • private subroutine read_undelimited(dtv, unit, terminators, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: dtv
    integer, intent(in) :: unit
    character(kind=CK,len=*), intent(in) :: terminators
    integer, intent(out) :: iostat
    character(len=*), intent(inout) :: iomsg

procedure, private, pass(dtv) :: read_undelimited_listdirected

  • private subroutine read_undelimited_listdirected(dtv, unit, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: dtv
    integer, intent(in) :: unit
    integer, intent(out) :: iostat
    character(len=*), intent(inout) :: iomsg

procedure, private, pass(dtv) :: write_formatted

  • private subroutine write_formatted(dtv, unit, iotype, v_list, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: dtv
    integer, intent(in) :: unit
    character(kind=CK,len=*), intent(in) :: iotype
    integer, intent(in) :: v_list(:)
    integer, intent(out) :: iostat
    character(kind=CK,len=*), intent(inout) :: iomsg

procedure, private, pass(dtv) :: read_unformatted

  • private subroutine read_unformatted(dtv, unit, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(inout) :: dtv
    integer, intent(in) :: unit
    integer, intent(out) :: iostat
    character(kind=CK,len=*), intent(inout) :: iomsg

procedure, private, pass(dtv) :: write_unformatted

  • private subroutine write_unformatted(dtv, unit, iostat, iomsg)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: dtv
    integer, intent(in) :: unit
    integer, intent(out) :: iostat
    character(kind=CK,len=*), intent(inout) :: iomsg

procedure, private, pass(self) :: replace_one_occurrence

  • private elemental function replace_one_occurrence(self, old, new) result(replaced)

    Arguments

    TypeIntentOptionalAttributesName
    class(string), intent(in) :: self
    character(kind=CK,len=*), intent(in) :: old
    character(kind=CK,len=*), intent(in) :: new

    Return Value type(string)

Source Code

type :: string
  !< OOP designed string class.
  character(kind=CK, len=:), allocatable :: raw !< Raw data.
  contains
    ! public methods
    ! builtins replacements
    procedure, pass(self) :: adjustl  => sadjustl                 !< Adjustl replacement.
    procedure, pass(self) :: adjustr  => sadjustr                 !< Adjustr replacement.
    procedure, pass(self) :: count    => scount                   !< Count replacement.
    generic               :: index    => sindex_string_string, &
                                         sindex_string_character  !< Index replacement.
    procedure, pass(self) :: len      => slen                     !< Len replacement.
    procedure, pass(self) :: len_trim => slen_trim                !< Len_trim replacement.
    generic               :: repeat   => srepeat_string_string, &
                                         srepeat_character_string !< Repeat replacement.
    generic               :: scan     => sscan_string_string,    &
                                         sscan_string_character   !< Scan replacement.
    procedure, pass(self) :: trim     => strim                    !< Trim replacement.
    generic               :: verify   => sverify_string_string, &
                                         sverify_string_character !< Verify replacement.
    ! auxiliary methods
    procedure, pass(self) :: basedir          !< Return the base directory name of a string containing a file name.
    procedure, pass(self) :: basename         !< Return the base file name of a string containing a file name.
    procedure, pass(self) :: camelcase        !< Return a string with all words capitalized without spaces.
    procedure, pass(self) :: capitalize       !< Return a string with its first character capitalized and the rest lowercased.
    procedure, pass(self) :: chars            !< Return the raw characters data.
    generic               :: colorize => &
                             colorize_str     !< Colorize and stylize strings.
    procedure, pass(self) :: decode           !< Decode string.
    procedure, pass(self) :: encode           !< Encode string.
    procedure, pass(self) :: escape           !< Escape backslashes (or custom escape character).
    procedure, pass(self) :: extension        !< Return the extension of a string containing a file name.
    procedure, pass(self) :: fill             !< Pad string on the left (or right) with zeros (or other char) to fill width.
    procedure, pass(self) :: free             !< Free dynamic memory.
    generic               :: glob =>         &
                             glob_character, &
                             glob_string      !< Glob search, finds all the pathnames matching a given pattern.
    generic               :: insert =>      &
                             insert_string, &
                             insert_character !< Insert substring into string at a specified position.
    generic               :: join =>       &
                             join_strings, &
                             join_characters  !< Return a string that is a join of an array of strings or characters.
    generic               :: strjoin =>   &
                             strjoin_strings, &
                             strjoin_characters  !< Return a string that is a join of an array of strings or characters.
    procedure, pass(self) :: lower            !< Return a string with all lowercase characters.
    procedure, pass(self) :: partition        !< Split string at separator and return the 3 parts (before, the separator and after).
    procedure, pass(self) :: read_file        !< Read a file a single string stream.
    procedure, pass(self) :: read_line        !< Read line (record) from a connected unit.
    procedure, pass(self) :: read_lines       !< Read (all) lines (records) from a connected unit as a single ascii stream.
    procedure, pass(self) :: replace          !< Return a string with all occurrences of substring old replaced by new.
    procedure, pass(self) :: reverse          !< Return a reversed string.
    procedure, pass(self) :: search           !< Search for *tagged* record into string.
    procedure, pass(self) :: slice            !< Return the raw characters data sliced.
    procedure, pass(self) :: snakecase        !< Return a string with all words lowercase separated by "_".
    procedure, pass(self) :: split            !< Return a list of substring in the string, using sep as the delimiter string.
    procedure, pass(self) :: split_chunked    !< Return a list of substring in the string, using sep as the delimiter string.
    procedure, pass(self) :: startcase        !< Return a string with all words capitalized, e.g. title case.
    procedure, pass(self) :: strip            !< Return a string with the leading and trailing characters removed.
    procedure, pass(self) :: swapcase         !< Return a string with uppercase chars converted to lowercase and vice versa.
    procedure, pass(self) :: tempname         !< Return a safe temporary name suitable for temporary file or directories.
    generic               :: to_number =>   &
                             to_integer_I1P,&
                             to_integer_I2P,&
                             to_integer_I4P,&
                             to_integer_I8P,&
#if defined _R16P
                             to_real_R16P,  &
#endif
                             to_real_R8P,   &
                             to_real_R4P      !< Cast string to number.
    procedure, pass(self) :: unescape         !< Unescape double backslashes (or custom escaped character).
    procedure, pass(self) :: unique           !< Reduce to one (unique) multiple occurrences of a substring into a string.
    procedure, pass(self) :: upper            !< Return a string with all uppercase characters.
    procedure, pass(self) :: write_file       !< Write a single string stream into file.
    procedure, pass(self) :: write_line       !< Write line (record) to a connected unit.
    procedure, pass(self) :: write_lines      !< Write lines (records) to a connected unit.
    ! inquire methods
    procedure, pass(self) :: end_with     !< Return true if a string ends with a specified suffix.
    procedure, pass(self) :: is_allocated !< Return true if the string is allocated.
    procedure, pass(self) :: is_digit     !< Return true if all characters in the string are digits.
    procedure, pass(self) :: is_integer   !< Return true if the string contains an integer.
    procedure, pass(self) :: is_lower     !< Return true if all characters in the string are lowercase.
    procedure, pass(self) :: is_number    !< Return true if the string contains a number (real or integer).
    procedure, pass(self) :: is_real      !< Return true if the string contains an real.
    procedure, pass(self) :: is_upper     !< Return true if all characters in the string are uppercase.
    procedure, pass(self) :: start_with   !< Return true if a string starts with a specified prefix.
    ! operators
    generic :: assignment(=) => string_assign_string,      &
                                string_assign_character,   &
                                string_assign_integer_I1P, &
                                string_assign_integer_I2P, &
                                string_assign_integer_I4P, &
                                string_assign_integer_I8P, &
#if defined _R16P
                                string_assign_real_R16P,   &
#endif
                                string_assign_real_R8P,    &
                                string_assign_real_R4P              !< Assignment operator overloading.
    generic :: operator(//) => string_concat_string,    &
                               string_concat_character, &
                               character_concat_string              !< Concatenation operator overloading.
    generic :: operator(.cat.) => string_concat_string_string,    &
                                  string_concat_character_string, &
                                  character_concat_string_string    !< Concatenation operator (string output) overloading.
    generic :: operator(==) => string_eq_string,    &
                               string_eq_character, &
                               character_eq_string                  !< Equal operator overloading.
    generic :: operator(/=) => string_ne_string,    &
                               string_ne_character, &
                               character_ne_string                  !< Not equal operator overloading.
    generic :: operator(<) => string_lt_string,    &
                              string_lt_character, &
                              character_lt_string                   !< Lower than operator overloading.
    generic :: operator(<=) => string_le_string,    &
                               string_le_character, &
                               character_le_string                  !< Lower equal than operator overloading.
    generic :: operator(>=) => string_ge_string,    &
                               string_ge_character, &
                               character_ge_string                  !< Greater equal than operator overloading.
    generic :: operator(>) => string_gt_string,    &
                              string_gt_character, &
                              character_gt_string                   !< Greater than operator overloading.
    ! IO
    generic :: read(formatted) => read_formatted       !< Formatted input.
    generic :: write(formatted) => write_formatted     !< Formatted output.
    generic :: read(unformatted) => read_unformatted   !< Unformatted input.
    generic :: write(unformatted) => write_unformatted !< Unformatted output.
    ! private methods
    ! builtins replacements
    procedure, private, pass(self) :: sindex_string_string     !< Index replacement.
    procedure, private, pass(self) :: sindex_string_character  !< Index replacement.
    procedure, private, pass(self) :: srepeat_string_string    !< Repeat replacement.
    procedure, private, nopass     :: srepeat_character_string !< Repeat replacement.
    procedure, private, pass(self) :: sscan_string_string      !< Scan replacement.
    procedure, private, pass(self) :: sscan_string_character   !< Scan replacement.
    procedure, private, pass(self) :: sverify_string_string    !< Verify replacement.
    procedure, private, pass(self) :: sverify_string_character !< Verify replacement.
    ! auxiliary methods
    procedure, private, pass(self) :: colorize_str     !< Colorize and stylize strings.
    procedure, private, pass(self) :: glob_character   !< Glob search (character output).
    procedure, private, pass(self) :: glob_string      !< Glob search (string output).
    procedure, private, pass(self) :: insert_string    !< Insert substring into string at a specified position.
    procedure, private, pass(self) :: insert_character !< Insert substring into string at a specified position.
    procedure, private, pass(self) :: join_strings     !< Return join string of an array of strings.
    procedure, private, pass(self) :: join_characters  !< Return join string of an array of characters.
    procedure, private, nopass ::     strjoin_strings  !< Return join string of an array of strings.
    procedure, private, nopass ::     strjoin_characters  !< Return join string of an array of strings.
    procedure, private, pass(self) :: to_integer_I1P   !< Cast string to integer.
    procedure, private, pass(self) :: to_integer_I2P   !< Cast string to integer.
    procedure, private, pass(self) :: to_integer_I4P   !< Cast string to integer.
    procedure, private, pass(self) :: to_integer_I8P   !< Cast string to integer.
    procedure, private, pass(self) :: to_real_R4P      !< Cast string to real.
    procedure, private, pass(self) :: to_real_R8P      !< Cast string to real.
    procedure, private, pass(self) :: to_real_R16P     !< Cast string to real.
    ! assignments
    procedure, private, pass(lhs) :: string_assign_string      !< Assignment operator from string input.
    procedure, private, pass(lhs) :: string_assign_character   !< Assignment operator from character input.
    procedure, private, pass(lhs) :: string_assign_integer_I1P !< Assignment operator from integer input.
    procedure, private, pass(lhs) :: string_assign_integer_I2P !< Assignment operator from integer input.
    procedure, private, pass(lhs) :: string_assign_integer_I4P !< Assignment operator from integer input.
    procedure, private, pass(lhs) :: string_assign_integer_I8P !< Assignment operator from integer input.
    procedure, private, pass(lhs) :: string_assign_real_R4P    !< Assignment operator from real input.
    procedure, private, pass(lhs) :: string_assign_real_R8P    !< Assignment operator from real input.
    procedure, private, pass(lhs) :: string_assign_real_R16P   !< Assignment operator from real input.
    ! concatenation operators
    procedure, private, pass(lhs) :: string_concat_string           !< Concatenation with string.
    procedure, private, pass(lhs) :: string_concat_character        !< Concatenation with character.
    procedure, private, pass(rhs) :: character_concat_string        !< Concatenation with character (inverted).
    procedure, private, pass(lhs) :: string_concat_string_string    !< Concatenation with string (string output).
    procedure, private, pass(lhs) :: string_concat_character_string !< Concatenation with character (string output).
    procedure, private, pass(rhs) :: character_concat_string_string !< Concatenation with character (inverted, string output).
    ! logical operators
    procedure, private, pass(lhs) :: string_eq_string    !< Equal to string logical operator.
    procedure, private, pass(lhs) :: string_eq_character !< Equal to character logical operator.
    procedure, private, pass(rhs) :: character_eq_string !< Equal to character (inverted) logical operator.
    procedure, private, pass(lhs) :: string_ne_string    !< Not equal to string logical operator.
    procedure, private, pass(lhs) :: string_ne_character !< Not equal to character logical operator.
    procedure, private, pass(rhs) :: character_ne_string !< Not equal to character (inverted) logical operator.
    procedure, private, pass(lhs) :: string_lt_string    !< Lower than to string logical operator.
    procedure, private, pass(lhs) :: string_lt_character !< Lower than to character logical operator.
    procedure, private, pass(rhs) :: character_lt_string !< Lower than to character (inverted) logical operator.
    procedure, private, pass(lhs) :: string_le_string    !< Lower equal than to string logical operator.
    procedure, private, pass(lhs) :: string_le_character !< Lower equal than to character logical operator.
    procedure, private, pass(rhs) :: character_le_string !< Lower equal than to character (inverted) logical operator.
    procedure, private, pass(lhs) :: string_ge_string    !< Greater equal than to string logical operator.
    procedure, private, pass(lhs) :: string_ge_character !< Greater equal than to character logical operator.
    procedure, private, pass(rhs) :: character_ge_string !< Greater equal than to character (inverted) logical operator.
    procedure, private, pass(lhs) :: string_gt_string    !< Greater than to string logical operator.
    procedure, private, pass(lhs) :: string_gt_character !< Greater than to character logical operator.
    procedure, private, pass(rhs) :: character_gt_string !< Greater than to character (inverted) logical operator.
    ! IO
    procedure, private, pass(dtv) :: read_formatted                !< Formatted input.
    procedure, private, pass(dtv) :: read_delimited                !< Read a delimited input.
    procedure, private, pass(dtv) :: read_undelimited              !< Read an undelimited input.
    procedure, private, pass(dtv) :: read_undelimited_listdirected !< Read an undelimited list directed input.
    procedure, private, pass(dtv) :: write_formatted               !< Formatted output.
    procedure, private, pass(dtv) :: read_unformatted              !< Unformatted input.
    procedure, private, pass(dtv) :: write_unformatted             !< Unformatted output.
    ! miscellanea
    procedure, private, pass(self) :: replace_one_occurrence !< Replace the first occurrence of substring old by new.
endtype string