gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
dc_string::concat Interface Reference

Public Member Functions

subroutine concat_tail (carray, str, result)

Detailed Description

Definition at line 149 of file dc_string.f90.

Member Function/Subroutine Documentation

◆ concat_tail()

subroutine dc_string::concat::concat_tail ( character(*), dimension(:), intent(in) carray,
character(*), intent(in) str,
character(string), dimension(:), pointer result )

Concatenate string to array elements

Appends str to the end of each element of character array carray and returns in result. Trailing spaces of carray elements are ignored. The array size of result(:) is determined automatically based on carray size. result(:) must be null or undefined when passed. Memory leak occurs if already allocated.

Parameters
[in]carrayCharacter array
[in]strString to append
[out]resultResult array pointer

Definition at line 1168 of file dc_string.f90.

1169 implicit none
1170 character(*), intent(in) :: carray(:)
1171 character(*), intent(in) :: str
1172 character(STRING), pointer:: result(:) ! (out)
1173 integer :: i, size_carray
1174 continue
1175 size_carray = size(carray)
1176 allocate(result(size_carray))
1177 do i = 1, size_carray
1178 result(i) = trim(carray(i)) // str
1179 end do

The documentation for this interface was generated from the following file: