character_concat_string_string Function

private elemental function character_concat_string_string(lhs, rhs) result(concat)

Arguments

Type IntentOptional AttributesName
character(kind=CK,len=*), intent(in) :: lhs

Left hand side.

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

Right hand side.

Return Value type(string)

Concatenated string.

Description

Concatenation with character (inverted).


Source Code

  elemental function character_concat_string_string(lhs, rhs) result(concat)
  !---------------------------------------------------------------------------------------------------------------------------------
  !< Concatenation with character (inverted).
  !---------------------------------------------------------------------------------------------------------------------------------
  character(kind=CK, len=*), intent(in)  :: lhs    !< Left hand side.
  class(string),             intent(in)  :: rhs    !< Right hand side.
  type(string)                           :: concat !< Concatenated string.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  if (allocated(rhs%raw)) then
    concat%raw = lhs//rhs%raw
  else
    concat%raw = lhs
  endif
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endfunction character_concat_string_string