string_concat_string Function

private pure function string_concat_string(lhs, rhs) result(concat)

Arguments

Type IntentOptional AttributesName
class(string), intent(in) :: lhs

Left hand side.

type(string), intent(in) :: rhs

Right hand side.

Return Value character(kind=CK,len=:), allocatable

Concatenated string.

Description

Concatenation with string.


Source Code

  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