character_operations_m Module


Contents


Functions

public function max_length_char_array(array) result(res)

Arguments

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

Return Value integer(kind=int32)

public function c_to_f_charpointer(char_cptr) result(res)

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in), value :: char_cptr

Return Value character(kind=c_char, len=:), pointer

public function c_to_f_charpointer_with_length(char_cptr, length) result(res)

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in) :: char_cptr
integer(kind=int32) :: length

Return Value character(kind=c_char, len=length), pointer

public function convert_cptr(cptr, length) result(fptr)

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in) :: cptr
integer(kind=c_size_t), intent(in) :: length

Return Value character(kind=c_char, len=length), pointer


Subroutines

public subroutine cchar_array_from_strings(words, c_words, max_length)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: words(:)
character(kind=c_char, len=max_length+1), intent(out), allocatable, target :: c_words(:)
integer(kind=int32), intent(in) :: max_length

public subroutine cchar_array_from_strings_no_null(words, c_words, max_length)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: words(:)
character(kind=c_char, len=max_length+1), intent(out), allocatable, target :: c_words(:)
integer(kind=int32), intent(in) :: max_length

public subroutine cptr_array_from_cchar(c_words, ptr_array)

Arguments

Type IntentOptional Attributes Name
character(kind=c_char, len=*), intent(in), target :: c_words(:)
type(c_ptr), intent(out), allocatable :: ptr_array(:)

public subroutine cptr_array_from_cchar_no_null(c_words, ptr_array)

Arguments

Type IntentOptional Attributes Name
character(kind=c_char, len=*), intent(in), target :: c_words(:)
type(c_ptr), intent(out), allocatable :: ptr_array(:)

public subroutine read_option(sizes, c_option, option)

Arguments

Type IntentOptional Attributes Name
type(c_PQconnOptionSizes), intent(in) :: sizes
type(c_PQconninfoOption), intent(inout) :: c_option
type(PQconninfoOption), intent(out) :: option

public subroutine c_char_to_f_string(cptr, str)

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in) :: cptr
character(len=:), intent(out), allocatable :: str