Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with string.
pure function string_concat_string(lhs, rhs) result(concat)
!---------------------------------------------------------------------------------------------------------------------------------
!< Concatenation with string.
!---------------------------------------------------------------------------------------------------------------------------------
class(string), intent(in) :: lhs !< Left hand side.
type(string), intent(in) :: rhs !< Right hand side.
character(kind=CK, len=:), allocatable :: concat !< Concatenated string.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
concat = ''
if (allocated(lhs%raw)) concat = lhs%raw
if (allocated(rhs%raw)) concat = concat//rhs%raw
return
!---------------------------------------------------------------------------------------------------------------------------------
endfunction string_concat_string