strings Module


Uses

  • module~~strings~~UsesGraph module~strings strings iso_c_binding iso_c_binding module~strings->iso_c_binding

Used by

  • module~~strings~~UsedByGraph module~strings strings module~basis_library basis_library module~basis_library->module~strings module~elements elements module~basis_library->module~elements module~elements->module~strings proc~atomic_structure_center atomic_structure%atomic_structure_center proc~atomic_structure_center->module~strings proc~electric_moments electric_moments proc~electric_moments->module~strings proc~get_states_overlap get_states_overlap proc~get_states_overlap->module~strings proc~get_structures_ao_overlap get_structures_ao_overlap proc~get_structures_ao_overlap->module~strings proc~guess_hcore guess_hcore proc~guess_hcore->module~strings proc~guess_huckel guess_huckel proc~guess_huckel->module~strings proc~hf_energy hf_energy proc~hf_energy->module~strings proc~hf_gradient hf_gradient proc~hf_gradient->module~strings proc~int1e int1e proc~int1e->module~strings proc~lowdin lowdin proc~lowdin->module~strings proc~mulliken mulliken proc~mulliken->module~strings proc~oqp_apply_basis oqp_apply_basis proc~oqp_apply_basis->module~strings proc~oqp_resp_charges oqp_resp_charges proc~oqp_resp_charges->module~strings proc~oqp_resp_charges->module~elements proc~oqp_tdhf_z_vector oqp_tdhf_z_vector proc~oqp_tdhf_z_vector->module~strings proc~resp_charges_c resp_charges_C proc~resp_charges_c->module~strings proc~tdhf_energy tdhf_energy proc~tdhf_energy->module~strings proc~tdhf_gradient tdhf_gradient proc~tdhf_gradient->module~strings proc~tdhf_gradient_c tdhf_gradient_C proc~tdhf_gradient_c->module~strings proc~tdhf_mrsf_energy tdhf_mrsf_energy proc~tdhf_mrsf_energy->module~strings proc~tdhf_sf_energy tdhf_sf_energy proc~tdhf_sf_energy->module~strings proc~tdhf_z_vector_c tdhf_z_vector_C proc~tdhf_z_vector_c->module~strings

Variables

Type Visibility Attributes Name Initial
character(len=*), public, parameter :: ALPHANUM = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
character(len=*), public, parameter :: AN_DASH = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-'

Derived Types

type, public ::  tokenizer_t

Components

Type Visibility Attributes Name Initial
character(len=:), public, pointer :: str => null()
character(len=:), public, pointer :: delims => null()

Type-Bound Procedures

procedure, public :: get => next_token

type, public, bind(C) ::  Cstring

Components

Type Visibility Attributes Name Initial
integer(kind=c_int64_t), public :: length
type(c_ptr), public :: string

Functions

public pure function to_upper(input_string) result(output_string)

@brief return string in upper case @author Igor S. Gerasimov @date Sep, 2019 --Initial release-- @date May, 2021 Moved to strings @date Sep, 2021 subroutine -> function @param line - (in)

Arguments

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

Return Value character(len=:), allocatable

public pure function to_lower(input_string) result(output_string)

@brief return string in lower case @author Igor S. Gerasimov @date Sep, 2021 --Initial release-- @param line - (inout)

Arguments

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

Return Value character(len=:), allocatable

public pure function count_substring(substring, string) result(res)

@brief This function return count of substring in string @author Igor S. Gerasimov @date Sep, 2019 --Initial release-- @date May, 2021 Moved to strings @param substring - (in) @param string - (in)

Arguments

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

Return Value integer

public pure function index_ith(substring, string, ith) result(res)

@brief This function return index of i'th substring in string @details if ind is negative, backward search will be result is equal 0 if search was failed @author Igor S. Gerasimov @date May, 2021 --Initial release-- @param substring - (in) @param string - (in) @param ith - (in) index of needed substring

Arguments

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

Return Value integer

public function fstring(string) result(res)

@brief This function return fortran allocatable string @author Igor S. Gerasimov @date April, 2022 --Initial release-- @param string - (in) C-like string

Arguments

Type IntentOptional Attributes Name
type(Cstring), intent(in) :: string

Return Value character(len=:), allocatable

public function c_f_char(cchar) result(fstr)

@brief Convert raw null-terminated C-string to Fortran string

Read more…

Arguments

Type IntentOptional Attributes Name
character(kind=c_char, len=1), intent(in) :: cchar(*)

Return Value character(len=:), allocatable


Subroutines

public pure subroutine remove_spaces(line)

@brief This routine remove not needed spaces from section line @detail This routine used revert reading of lines. Example, that this routine do: > DFTTYP = PBE0 BASNAM=APC4 , ACC5 < DFTTYP=PBE0 BASNAM=APC4,ACC5 @author Igor S. Gerasimov @date Sep, 2019 --Initial release-- @date May, 2021 Moved to strings @param line - (inout) worked line

Arguments

Type IntentOptional Attributes Name
character(len=:), intent(inout), allocatable :: line

public subroutine f_c_char(from, to, numchar)

@brief Convert Fortran string to a raw null-terminated C-string

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: from
character(kind=c_char, len=1) :: to(*)
integer, intent(in) :: numchar