string_concat_character_string Function

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

Arguments

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

Left hand side.

character(kind=CK,len=*), intent(in) :: rhs

Right hand side.

Return Value type(string)

Concatenated string.

Description

Concatenation with character.


Source Code

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

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