stringifor.F90 Source File

StringiFor, Strings Fortran, yet another stringify Fortran module

This File Depends On

sourcefile~~stringifor.f90~~EfferentGraph sourcefile~stringifor.f90 stringifor.F90 sourcefile~penf.f90 penf.F90 sourcefile~penf.f90->sourcefile~stringifor.f90 sourcefile~stringifor_string_t.f90 stringifor_string_t.F90 sourcefile~penf.f90->sourcefile~stringifor_string_t.f90 sourcefile~befor64.f90 befor64.F90 sourcefile~penf.f90->sourcefile~befor64.f90 sourcefile~befor64_pack_data_m.f90 befor64_pack_data_m.F90 sourcefile~penf.f90->sourcefile~befor64_pack_data_m.f90 sourcefile~stringifor_string_t.f90->sourcefile~stringifor.f90 sourcefile~penf_b_size.f90 penf_b_size.F90 sourcefile~penf_b_size.f90->sourcefile~penf.f90 sourcefile~penf_stringify.f90 penf_stringify.F90 sourcefile~penf_b_size.f90->sourcefile~penf_stringify.f90 sourcefile~penf_global_parameters_variables.f90 penf_global_parameters_variables.F90 sourcefile~penf_global_parameters_variables.f90->sourcefile~penf.f90 sourcefile~penf_global_parameters_variables.f90->sourcefile~penf_b_size.f90 sourcefile~penf_global_parameters_variables.f90->sourcefile~penf_stringify.f90 sourcefile~penf_stringify.f90->sourcefile~penf.f90 sourcefile~befor64.f90->sourcefile~stringifor_string_t.f90 sourcefile~befor64_pack_data_m.f90->sourcefile~befor64.f90
Help

Files Dependent On This One

sourcefile~~stringifor.f90~~AfferentGraph sourcefile~stringifor.f90 stringifor.F90 sourcefile~csv_naive_parser.f90 csv_naive_parser.f90 sourcefile~stringifor.f90->sourcefile~csv_naive_parser.f90 sourcefile~fury_system_si32.f90 fury_system_si32.F90 sourcefile~stringifor.f90->sourcefile~fury_system_si32.f90 sourcefile~swapcase.f90 swapcase.f90 sourcefile~stringifor.f90->sourcefile~swapcase.f90 sourcefile~fury_uom_symbol32.f90 fury_uom_symbol32.F90 sourcefile~stringifor.f90->sourcefile~fury_uom_symbol32.f90 sourcefile~equal.f90 equal.f90 sourcefile~stringifor.f90->sourcefile~equal.f90 sourcefile~fury_uom64.f90 fury_uom64.F90 sourcefile~stringifor.f90->sourcefile~fury_uom64.f90 sourcefile~strip.f90 strip.f90 sourcefile~stringifor.f90->sourcefile~strip.f90 sourcefile~escape.f90 escape.f90 sourcefile~stringifor.f90->sourcefile~escape.f90 sourcefile~is_real.f90 is_real.f90 sourcefile~stringifor.f90->sourcefile~is_real.f90 sourcefile~extension.f90 extension.f90 sourcefile~stringifor.f90->sourcefile~extension.f90 sourcefile~lower_than.f90 lower_than.f90 sourcefile~stringifor.f90->sourcefile~lower_than.f90 sourcefile~fill.f90 fill.f90 sourcefile~stringifor.f90->sourcefile~fill.f90 sourcefile~is_number.f90 is_number.f90 sourcefile~stringifor.f90->sourcefile~is_number.f90 sourcefile~fury_uom128.f90 fury_uom128.F90 sourcefile~stringifor.f90->sourcefile~fury_uom128.f90 sourcefile~decode.f90 decode.f90 sourcefile~stringifor.f90->sourcefile~decode.f90 sourcefile~startcase.f90 startcase.f90 sourcefile~stringifor.f90->sourcefile~startcase.f90 sourcefile~fury_uom_reference64.f90 fury_uom_reference64.F90 sourcefile~stringifor.f90->sourcefile~fury_uom_reference64.f90 sourcefile~split.f90 split.f90 sourcefile~stringifor.f90->sourcefile~split.f90 sourcefile~sscan.f90 sscan.f90 sourcefile~stringifor.f90->sourcefile~sscan.f90 sourcefile~insert.f90 insert.f90 sourcefile~stringifor.f90->sourcefile~insert.f90 sourcefile~greater_equal_than.f90 greater_equal_than.f90 sourcefile~stringifor.f90->sourcefile~greater_equal_than.f90 sourcefile~scount.f90 scount.f90 sourcefile~stringifor.f90->sourcefile~scount.f90 sourcefile~snakecase.f90 snakecase.f90 sourcefile~stringifor.f90->sourcefile~snakecase.f90 sourcefile~greater_than.f90 greater_than.f90 sourcefile~stringifor.f90->sourcefile~greater_than.f90 sourcefile~not_equal.f90 not_equal.f90 sourcefile~stringifor.f90->sourcefile~not_equal.f90 sourcefile~fury_system_si64.f90 fury_system_si64.F90 sourcefile~stringifor.f90->sourcefile~fury_system_si64.f90 sourcefile~sadjustlr.f90 sadjustlr.f90 sourcefile~stringifor.f90->sourcefile~sadjustlr.f90 sourcefile~slice.f90 slice.f90 sourcefile~stringifor.f90->sourcefile~slice.f90 sourcefile~io_basic.f90 io_basic.F90 sourcefile~stringifor.f90->sourcefile~io_basic.f90 sourcefile~write_lines.f90 write_lines.f90 sourcefile~stringifor.f90->sourcefile~write_lines.f90 sourcefile~encode.f90 encode.f90 sourcefile~stringifor.f90->sourcefile~encode.f90 sourcefile~fury.f90 fury.f90 sourcefile~stringifor.f90->sourcefile~fury.f90 sourcefile~reverse.f90 reverse.f90 sourcefile~stringifor.f90->sourcefile~reverse.f90 sourcefile~fury_system_si128.f90 fury_system_si128.F90 sourcefile~stringifor.f90->sourcefile~fury_system_si128.f90 sourcefile~camelcase.f90 camelcase.f90 sourcefile~stringifor.f90->sourcefile~camelcase.f90 sourcefile~is_integer.f90 is_integer.f90 sourcefile~stringifor.f90->sourcefile~is_integer.f90 sourcefile~replace.f90 replace.f90 sourcefile~stringifor.f90->sourcefile~replace.f90 sourcefile~slen.f90 slen.f90 sourcefile~stringifor.f90->sourcefile~slen.f90 sourcefile~fury_uom_reference128.f90 fury_uom_reference128.F90 sourcefile~stringifor.f90->sourcefile~fury_uom_reference128.f90 sourcefile~upper_lower.f90 upper_lower.f90 sourcefile~stringifor.f90->sourcefile~upper_lower.f90 sourcefile~free.f90 free.f90 sourcefile~stringifor.f90->sourcefile~free.f90 sourcefile~sverify.f90 sverify.f90 sourcefile~stringifor.f90->sourcefile~sverify.f90 sourcefile~fury_mixed_kinds.f90 fury_mixed_kinds.F90 sourcefile~stringifor.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~read_lines.f90 read_lines.f90 sourcefile~stringifor.f90->sourcefile~read_lines.f90 sourcefile~sindex.f90 sindex.f90 sourcefile~stringifor.f90->sourcefile~sindex.f90 sourcefile~fury_system_abstract32.f90 fury_system_abstract32.F90 sourcefile~stringifor.f90->sourcefile~fury_system_abstract32.f90 sourcefile~unique.f90 unique.f90 sourcefile~stringifor.f90->sourcefile~unique.f90 sourcefile~join.f90 join.f90 sourcefile~stringifor.f90->sourcefile~join.f90 sourcefile~fury_system_abstract64.f90 fury_system_abstract64.F90 sourcefile~stringifor.f90->sourcefile~fury_system_abstract64.f90 sourcefile~search.f90 search.f90 sourcefile~stringifor.f90->sourcefile~search.f90 sourcefile~fury_uom_symbol128.f90 fury_uom_symbol128.F90 sourcefile~stringifor.f90->sourcefile~fury_uom_symbol128.f90 sourcefile~unescape.f90 unescape.f90 sourcefile~stringifor.f90->sourcefile~unescape.f90 sourcefile~fury_uom_symbol64.f90 fury_uom_symbol64.F90 sourcefile~stringifor.f90->sourcefile~fury_uom_symbol64.f90 sourcefile~strim.f90 strim.f90 sourcefile~stringifor.f90->sourcefile~strim.f90 sourcefile~fury_qreal64.f90 fury_qreal64.F90 sourcefile~stringifor.f90->sourcefile~fury_qreal64.f90 sourcefile~fury_qreal128.f90 fury_qreal128.F90 sourcefile~stringifor.f90->sourcefile~fury_qreal128.f90 sourcefile~to_number.f90 to_number.f90 sourcefile~stringifor.f90->sourcefile~to_number.f90 sourcefile~fury_uom32.f90 fury_uom32.F90 sourcefile~stringifor.f90->sourcefile~fury_uom32.f90 sourcefile~io_listdirected.f90 io_listdirected.F90 sourcefile~stringifor.f90->sourcefile~io_listdirected.f90 sourcefile~partition.f90 partition.f90 sourcefile~stringifor.f90->sourcefile~partition.f90 sourcefile~read_file.f90 read_file.f90 sourcefile~stringifor.f90->sourcefile~read_file.f90 sourcefile~write_file.f90 write_file.f90 sourcefile~stringifor.f90->sourcefile~write_file.f90 sourcefile~start_end.f90 start_end.f90 sourcefile~stringifor.f90->sourcefile~start_end.f90 sourcefile~fury_system_abstract128.f90 fury_system_abstract128.F90 sourcefile~stringifor.f90->sourcefile~fury_system_abstract128.f90 sourcefile~assignments.f90 assignments.f90 sourcefile~stringifor.f90->sourcefile~assignments.f90 sourcefile~is_digit.f90 is_digit.f90 sourcefile~stringifor.f90->sourcefile~is_digit.f90 sourcefile~basename_dir.f90 basename_dir.f90 sourcefile~stringifor.f90->sourcefile~basename_dir.f90 sourcefile~fury_uom_reference32.f90 fury_uom_reference32.F90 sourcefile~stringifor.f90->sourcefile~fury_uom_reference32.f90 sourcefile~read_line.f90 read_line.f90 sourcefile~stringifor.f90->sourcefile~read_line.f90 sourcefile~srepeat.f90 srepeat.f90 sourcefile~stringifor.f90->sourcefile~srepeat.f90 sourcefile~capitalize.f90 capitalize.f90 sourcefile~stringifor.f90->sourcefile~capitalize.f90 sourcefile~lower_equal_than.f90 lower_equal_than.f90 sourcefile~stringifor.f90->sourcefile~lower_equal_than.f90 sourcefile~concatenation.f90 concatenation.f90 sourcefile~stringifor.f90->sourcefile~concatenation.f90 sourcefile~fury_qreal32.f90 fury_qreal32.F90 sourcefile~stringifor.f90->sourcefile~fury_qreal32.f90 sourcefile~fury_system_si32.f90->sourcefile~fury.f90 sourcefile~fury_uom_symbol32.f90->sourcefile~fury.f90 sourcefile~fury_uom_symbol32.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom_symbol32.f90->sourcefile~fury_uom32.f90 sourcefile~fury_uom_symbol32.f90->sourcefile~fury_uom_reference32.f90 sourcefile~fury_uom64.f90->sourcefile~fury_system_si64.f90 sourcefile~fury_uom64.f90->sourcefile~fury.f90 sourcefile~fury_uom64.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom64.f90->sourcefile~fury_system_abstract64.f90 sourcefile~fury_uom64.f90->sourcefile~fury_qreal64.f90 sourcefile~fury_uom128.f90->sourcefile~fury.f90 sourcefile~fury_uom128.f90->sourcefile~fury_system_si128.f90 sourcefile~fury_uom128.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom128.f90->sourcefile~fury_qreal128.f90 sourcefile~fury_uom128.f90->sourcefile~fury_system_abstract128.f90 sourcefile~fury_uom_reference64.f90->sourcefile~fury_uom64.f90 sourcefile~fury_uom_reference64.f90->sourcefile~fury.f90 sourcefile~fury_uom_reference64.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom_reference64.f90->sourcefile~fury_system_abstract64.f90 sourcefile~fury_system_si64.f90->sourcefile~fury.f90 sourcefile~fury_test_qreal_eq.f90 fury_test_qreal_eq.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_eq.f90 sourcefile~fury_test_uom_assign.f90 fury_test_uom_assign.f90 sourcefile~fury.f90->sourcefile~fury_test_uom_assign.f90 sourcefile~fury_test_qreal_eq_mixed.f90 fury_test_qreal_eq_mixed.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_eq_mixed.f90 sourcefile~fury_test_qreal_mul.f90 fury_test_qreal_mul.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_mul.f90 sourcefile~fury_test_qreal_mul_mixed.f90 fury_test_qreal_mul_mixed.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_mul_mixed.f90 sourcefile~fury_test_qreal_not_eq.f90 fury_test_qreal_not_eq.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_not_eq.f90 sourcefile~fury_test_uom_sub.f90 fury_test_uom_sub.f90 sourcefile~fury.f90->sourcefile~fury_test_uom_sub.f90 sourcefile~fury_test_qreal_not_eq_mixed.f90 fury_test_qreal_not_eq_mixed.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_not_eq_mixed.f90 sourcefile~fury_test_qreal_pow.f90 fury_test_qreal_pow.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_pow.f90 sourcefile~fury_test_uom_assign_failure.f90 fury_test_uom_assign_failure.f90 sourcefile~fury.f90->sourcefile~fury_test_uom_assign_failure.f90 sourcefile~fury_test_qreal_sub.f90 fury_test_qreal_sub.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_sub.f90 sourcefile~fury_test_qreal_sub_failure.f90 fury_test_qreal_sub_failure.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_sub_failure.f90 sourcefile~fury_test_qreal_sub_mixed.f90 fury_test_qreal_sub_mixed.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_sub_mixed.f90 sourcefile~fury_test_qreal_sub_mixed_failure.f90 fury_test_qreal_sub_mixed_failure.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_sub_mixed_failure.f90 sourcefile~fury_test_uom_sub_failure.f90 fury_test_uom_sub_failure.f90 sourcefile~fury.f90->sourcefile~fury_test_uom_sub_failure.f90 sourcefile~fury_test_system_si.f90 fury_test_system_si.f90 sourcefile~fury.f90->sourcefile~fury_test_system_si.f90 sourcefile~fury_test_uom_add.f90 fury_test_uom_add.f90 sourcefile~fury.f90->sourcefile~fury_test_uom_add.f90 sourcefile~fury_test_uom_div.f90 fury_test_uom_div.f90 sourcefile~fury.f90->sourcefile~fury_test_uom_div.f90 sourcefile~fury_test_uom_add_failure.f90 fury_test_uom_add_failure.f90 sourcefile~fury.f90->sourcefile~fury_test_uom_add_failure.f90 sourcefile~fury_test_uom_aliases.f90 fury_test_uom_aliases.f90 sourcefile~fury.f90->sourcefile~fury_test_uom_aliases.f90 sourcefile~fury_test_bolt32.f90 fury_test_bolt32.f90 sourcefile~fury.f90->sourcefile~fury_test_bolt32.f90 sourcefile~fury_test_bolt64.f90 fury_test_bolt64.f90 sourcefile~fury.f90->sourcefile~fury_test_bolt64.f90 sourcefile~fury_test_qreal_add.f90 fury_test_qreal_add.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_add.f90 sourcefile~fury_test_uom_mul.f90 fury_test_uom_mul.f90 sourcefile~fury.f90->sourcefile~fury_test_uom_mul.f90 sourcefile~fury_test_qreal_add_aliases_failure.f90 fury_test_qreal_add_aliases_failure.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_add_aliases_failure.f90 sourcefile~fury_test_uom_pow.f90 fury_test_uom_pow.f90 sourcefile~fury.f90->sourcefile~fury_test_uom_pow.f90 sourcefile~fury_test_qreal_add_failure.f90 fury_test_qreal_add_failure.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_add_failure.f90 sourcefile~fury_test_qreal_add_mixed.f90 fury_test_qreal_add_mixed.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_add_mixed.f90 sourcefile~fury_test_qreal_add_mixed_failure.f90 fury_test_qreal_add_mixed_failure.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_add_mixed_failure.f90 sourcefile~fury_test_qreal_aliases.f90 fury_test_qreal_aliases.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_aliases.f90 sourcefile~fury_test_uom_parse_failure.f90 fury_test_uom_parse_failure.f90 sourcefile~fury.f90->sourcefile~fury_test_uom_parse_failure.f90 sourcefile~fury_test_qreal_assign.f90 fury_test_qreal_assign.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_assign.f90 sourcefile~fury_test_qreal_conversions_complex.f90 fury_test_qreal_conversions_complex.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_conversions_complex.f90 sourcefile~fury_test_qreal_conversions_si.f90 fury_test_qreal_conversions_si.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_conversions_si.f90 sourcefile~fury_test_qreal_conversions_simple.f90 fury_test_qreal_conversions_simple.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_conversions_simple.f90 sourcefile~fury_test_qreal_div.f90 fury_test_qreal_div.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_div.f90 sourcefile~fury_test_qreal_div_mixed.f90 fury_test_qreal_div_mixed.f90 sourcefile~fury.f90->sourcefile~fury_test_qreal_div_mixed.f90 sourcefile~fury_system_si128.f90->sourcefile~fury.f90 sourcefile~fury_uom_reference128.f90->sourcefile~fury_uom128.f90 sourcefile~fury_uom_reference128.f90->sourcefile~fury.f90 sourcefile~fury_uom_reference128.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom_reference128.f90->sourcefile~fury_system_abstract128.f90 sourcefile~fury_mixed_kinds.f90->sourcefile~fury.f90 sourcefile~fury_system_abstract32.f90->sourcefile~fury_system_si32.f90 sourcefile~fury_system_abstract32.f90->sourcefile~fury.f90 sourcefile~fury_system_abstract64.f90->sourcefile~fury_system_si64.f90 sourcefile~fury_system_abstract64.f90->sourcefile~fury.f90 sourcefile~fury_uom_symbol128.f90->sourcefile~fury_uom128.f90 sourcefile~fury_uom_symbol128.f90->sourcefile~fury.f90 sourcefile~fury_uom_symbol128.f90->sourcefile~fury_uom_reference128.f90 sourcefile~fury_uom_symbol128.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom_symbol64.f90->sourcefile~fury_uom64.f90 sourcefile~fury_uom_symbol64.f90->sourcefile~fury_uom_reference64.f90 sourcefile~fury_uom_symbol64.f90->sourcefile~fury.f90 sourcefile~fury_uom_symbol64.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_qreal64.f90->sourcefile~fury_system_si64.f90 sourcefile~fury_qreal64.f90->sourcefile~fury.f90 sourcefile~fury_qreal64.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_qreal64.f90->sourcefile~fury_system_abstract64.f90 sourcefile~fury_qreal128.f90->sourcefile~fury.f90 sourcefile~fury_qreal128.f90->sourcefile~fury_system_si128.f90 sourcefile~fury_qreal128.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_qreal128.f90->sourcefile~fury_system_abstract128.f90 sourcefile~fury_uom32.f90->sourcefile~fury_system_si32.f90 sourcefile~fury_uom32.f90->sourcefile~fury.f90 sourcefile~fury_uom32.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom32.f90->sourcefile~fury_system_abstract32.f90 sourcefile~fury_uom32.f90->sourcefile~fury_qreal32.f90 sourcefile~fury_system_abstract128.f90->sourcefile~fury.f90 sourcefile~fury_system_abstract128.f90->sourcefile~fury_system_si128.f90 sourcefile~fury_uom_reference32.f90->sourcefile~fury.f90 sourcefile~fury_uom_reference32.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_uom_reference32.f90->sourcefile~fury_system_abstract32.f90 sourcefile~fury_uom_reference32.f90->sourcefile~fury_uom32.f90 sourcefile~fury_qreal32.f90->sourcefile~fury_system_si32.f90 sourcefile~fury_qreal32.f90->sourcefile~fury.f90 sourcefile~fury_qreal32.f90->sourcefile~fury_mixed_kinds.f90 sourcefile~fury_qreal32.f90->sourcefile~fury_system_abstract32.f90
Help

Source Code


Source Code

!< StringiFor, Strings Fortran, yet another stringify Fortran module
module stringifor
!-----------------------------------------------------------------------------------------------------------------------------------
!< StringiFor, Strings Fortran, yet another stringify Fortran module
!-----------------------------------------------------------------------------------------------------------------------------------
use penf, only : I1P, I2P, I4P, I8P, R4P, R8P, R16P
use stringifor_string_t, only : CK,                                                                     &
                                sadjustl_character, sadjustr_character,                                 &
                                sindex_string_string, sindex_string_character, sindex_character_string, &
                                slen, slen_trim,                                                        &
                                srepeat_string_string,                                                  &
                                sscan_string_string, sscan_string_character, sscan_character_string,    &
                                strim,                                                                  &
                                string
!-----------------------------------------------------------------------------------------------------------------------------------

!-----------------------------------------------------------------------------------------------------------------------------------
implicit none
private
save
! expose StingiFor objects
public :: CK
public :: string
! expose StingiFor overloaded builtins
public :: adjustl, adjustr, count, index, len, len_trim, repeat, scan, trim
! expose StingiFor new procedures
public :: read_file, read_lines, write_file, write_lines
! expose PENF kinds
public :: I1P, I2P, I4P, I8P, R4P, R8P, R16P
!-----------------------------------------------------------------------------------------------------------------------------------

!-----------------------------------------------------------------------------------------------------------------------------------
! builtins overloading interfaces
interface adjustl
  !< Builtin adjustl overloading.
  module procedure sadjustl_character
endinterface adjustl
interface adjustr
  !< Builtin adjustr overloading.
  module procedure sadjustr_character
endinterface adjustr
interface count
  !< Builtin count overloading.
  module procedure count_substring
endinterface
interface index
  !< Builtin index overloading.
  module procedure sindex_string_string, sindex_string_character, sindex_character_string
endinterface index
interface len
  !< Builtin len overloading.
  module procedure slen
endinterface len
interface len_trim
  !< Builtin len_trim overloading.
  module procedure slen_trim
endinterface len_trim
interface repeat
  !< Builtin repeat overloading.
  module procedure srepeat_string_string
endinterface repeat
interface scan
  !< Builtin scan overloading.
  module procedure sscan_string_string, sscan_string_character, sscan_character_string
endinterface scan
interface trim
  !< Builtin trim overloading.
  module procedure strim
endinterface trim
!-----------------------------------------------------------------------------------------------------------------------------------
contains
  elemental function count_substring(string_, substring) result(No)
  !---------------------------------------------------------------------------------------------------------------------------------
  !< Count the number of occurences of a substring into a string.
  !---------------------------------------------------------------------------------------------------------------------------------
  character(*), intent(in) :: string_   !< String.
  character(*), intent(in) :: substring !< Substring.
  integer(I4P)             :: No        !< Number of occurrences.
  integer(I4P)             :: c1        !< Counters.
  integer(I4P)             :: c2        !< Counters.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  No = 0
  if (len(substring)>len(string_)) return
  c1 = 1
  do
    c2 = index(string=string_(c1:), substring=substring)
    if (c2==0) return
    No = No + 1
    c1 = c1 + c2 + len(substring)
  enddo
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endfunction count_substring

  subroutine read_file(file, lines, form, iostat, iomsg)
  !---------------------------------------------------------------------------------------------------------------------------------
  !< Read a file as a single string stream.
  !<
  !< The lines are returned as an array of strings that are read until the eof is reached.
  !< The line is read as an ascii stream read until the eor is reached.
  !<
  !< @note For unformatted read only `access='stream'` is supported with new_line as line terminator.
  !---------------------------------------------------------------------------------------------------------------------------------
  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.
  type(string)                               :: form_      !< Format of unit, local variable.
  integer                                    :: iostat_    !< IO status code, local variable.
  character(len=:), allocatable              :: iomsg_     !< IO status message, local variable.
  integer                                    :: unit       !< Logical unit.
  logical                                    :: does_exist !< Check if file exist.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  iomsg_ = repeat(' ', 99) ; if (present(iomsg)) iomsg_ = iomsg
  inquire(file=file, iomsg=iomsg_, iostat=iostat_, exist=does_exist)
  if (does_exist) then
    form_ = 'FORMATTED' ; if (present(form)) form_ = form ; form_ = form_%upper()
    select case(form_%chars())
    case('FORMATTED')
      open(newunit=unit, file=file, status='OLD', action='READ', iomsg=iomsg_, iostat=iostat_, err=10)
    case('UNFORMATTED')
      open(newunit=unit, file=file, status='OLD', action='READ', form='UNFORMATTED', access='STREAM', &
           iomsg=iomsg_, iostat=iostat_, err=10)
    endselect
    call read_lines(unit=unit, lines=lines, form=form, iomsg=iomsg_, iostat=iostat_)
    10 close(unit)
  endif
  if (present(iostat)) iostat = iostat_
  if (present(iomsg)) iomsg = iomsg_
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endsubroutine read_file

  subroutine read_lines(unit, lines, form, iostat, iomsg)
  !---------------------------------------------------------------------------------------------------------------------------------
  !< Read lines (records) from a connected-formatted unit.
  !<
  !< @note The connected unit is rewinded. At a successful exit current record is at eof, at the beginning otherwise.
  !<
  !< The lines are returned as an array of strings that are read until the eof is reached.
  !< The line is read as an ascii stream read until the eor is reached.
  !<
  !< @note For unformatted read only `access='stream'` is supported with new_line as line terminator.
  !---------------------------------------------------------------------------------------------------------------------------------
  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.
  type(string)                               :: form_    !< Format of unit, local variable.
  integer                                    :: iostat_  !< IO status code, local variable.
  character(len=:), allocatable              :: iomsg_   !< IO status message, local variable.
  character(kind=CK, len=1)                  :: ch       !< Character storage.
  integer                                    :: l        !< Counter.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  form_ = 'FORMATTED' ; if (present(form)) form_ = form ; form_ = form_%upper()
  iomsg_ = repeat(' ', 99) ; if (present(iomsg)) iomsg_ = iomsg
  rewind(unit)
  select case(form_%chars())
  case('FORMATTED')
    l = 0
    do
      read(unit, *, err=10, end=10)
      l = l + 1
    enddo
  case('UNFORMATTED')
    l = 0
    do
      read(unit, err=10, end=10) ch
      if (ch==new_line('a')) l = l + 1
    enddo
  endselect
  10 rewind(unit)
  if (l>0) then
    allocate(lines(1:l))
    l = 1
    iostat_ = 0
    do
      call lines(l)%read_line(unit=unit, form=form, iostat=iostat_, iomsg=iomsg_)
      if ((iostat_/=0.and..not.is_iostat_eor(iostat_)).or.(l>=size(lines, dim=1))) then
        exit
      endif
      l = l + 1
    enddo
  endif
  if (present(iostat)) iostat = iostat_
  if (present(iomsg)) iomsg = iomsg_
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endsubroutine read_lines

  subroutine write_lines(unit, lines, form, iostat, iomsg)
  !---------------------------------------------------------------------------------------------------------------------------------
  !< Write lines (records) to a connected-formatted unit.
  !---------------------------------------------------------------------------------------------------------------------------------
  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.
  integer                                   :: l         !< Counter.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  do l=1, size(lines, dim=1)
    call lines(l)%write_line(unit=unit, form=form, iostat=iostat, iomsg=iomsg)
  enddo
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endsubroutine write_lines

  subroutine write_file(file, lines, form, iostat, iomsg)
  !---------------------------------------------------------------------------------------------------------------------------------
  !< Write a single string stream into file.
  !<
  !< @note For unformatted read only `access='stream'` is supported with new_line as line terminator.
  !---------------------------------------------------------------------------------------------------------------------------------
  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.
  type(string)                              :: form_     !< Format of unit, local variable.
  integer                                   :: iostat_   !< IO status code, local variable.
  character(len=:), allocatable             :: iomsg_    !< IO status message, local variable.
  integer                                   :: unit      !< Logical unit.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  iomsg_ = repeat(' ', 99) ; if (present(iomsg)) iomsg_ = iomsg
  form_ = 'FORMATTED' ; if (present(form)) form_ = form ; form_ = form_%upper()
  select case(form_%chars())
  case('FORMATTED')
    open(newunit=unit, file=file, action='WRITE', iomsg=iomsg_, iostat=iostat_, err=10)
  case('UNFORMATTED')
    open(newunit=unit, file=file, action='WRITE', form='UNFORMATTED', access='STREAM', iomsg=iomsg_, iostat=iostat_, err=10)
  endselect
  call write_lines(unit=unit, lines=lines, form=form, iomsg=iomsg_, iostat=iostat_)
  10 close(unit)
  if (present(iostat)) iostat = iostat_
  if (present(iomsg)) iomsg = iomsg_
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endsubroutine write_file
endmodule stringifor

assignments.f90 basename_dir.f90 befor64.F90 befor64.F90 befor64_pack_data_m.F90 befor64_pack_data_m.F90 camelcase.f90 capitalize.f90 compact_real.f90 compact_real.f90 compact_real.f90 concatenation.f90 csv_naive_parser.f90 decode.f90 encode.f90 equal.f90 escape.f90 extension.f90 fill.f90 free.f90 fury.f90 fury_mixed_kinds.F90 fury_qreal128.F90 fury_qreal32.F90 fury_qreal64.F90 fury_system_abstract128.F90 fury_system_abstract32.F90 fury_system_abstract64.F90 fury_system_si128.F90 fury_system_si32.F90 fury_system_si64.F90 fury_test_bolt32.f90 fury_test_bolt64.f90 fury_test_qreal_add.f90 fury_test_qreal_add_aliases_failure.f90 fury_test_qreal_add_failure.f90 fury_test_qreal_add_mixed.f90 fury_test_qreal_add_mixed_failure.f90 fury_test_qreal_aliases.f90 fury_test_qreal_assign.f90 fury_test_qreal_conversions_complex.f90 fury_test_qreal_conversions_si.f90 fury_test_qreal_conversions_simple.f90 fury_test_qreal_div.f90 fury_test_qreal_div_mixed.f90 fury_test_qreal_eq.f90 fury_test_qreal_eq_mixed.f90 fury_test_qreal_mul.f90 fury_test_qreal_mul_mixed.f90 fury_test_qreal_not_eq.f90 fury_test_qreal_not_eq_mixed.f90 fury_test_qreal_pow.f90 fury_test_qreal_sub.f90 fury_test_qreal_sub_failure.f90 fury_test_qreal_sub_mixed.f90 fury_test_qreal_sub_mixed_failure.f90 fury_test_system_si.f90 fury_test_uom_add.f90 fury_test_uom_add_failure.f90 fury_test_uom_aliases.f90 fury_test_uom_assign.f90 fury_test_uom_assign_failure.f90 fury_test_uom_div.f90 fury_test_uom_mul.f90 fury_test_uom_parse_failure.f90 fury_test_uom_pow.f90 fury_test_uom_sub.f90 fury_test_uom_sub_failure.f90 fury_uom128.F90 fury_uom32.F90 fury_uom64.F90 fury_uom_converter.F90 fury_uom_reference128.F90 fury_uom_reference32.F90 fury_uom_reference64.F90 fury_uom_symbol128.F90 fury_uom_symbol32.F90 fury_uom_symbol64.F90 greater_equal_than.f90 greater_than.f90 insert.f90 io_basic.F90 io_listdirected.F90 is_digit.f90 is_integer.f90 is_number.f90 is_real.f90 join.f90 lower_equal_than.f90 lower_than.f90 not_equal.f90 partition.f90 penf.F90 penf.F90 penf.F90 penf.F90 penf.F90 penf_b_size.F90 penf_global_parameters_variables.F90 penf_stringify.F90 read_file.f90 read_line.f90 read_lines.f90 replace.f90 reverse.f90 sadjustlr.f90 scount.f90 search.f90 sindex.f90 slen.f90 slice.f90 snakecase.f90 split.f90 srepeat.f90 sscan.f90 start_end.f90 startcase.f90 strim.f90 stringifor.F90 stringifor_string_t.F90 strip.f90 sverify.f90 swapcase.f90 test_all.F90 test_all.f90 test_all.f90 Test_Driver.f90 to_number.f90 unescape.f90 unique.f90 upper_lower.f90 write_file.f90 write_lines.f90