new_string Module Function

elemental module function new_string(string) result(new)

Constructor for new string instances from a scalar character value.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in), optional :: string

Return Value type(string_type)


Source Code

   elemental module function new_string(string) result(new)
      character(len=*), intent(in), optional :: string
      type(string_type) :: new
      if (present(string)) then
         new%raw = string
      end if
   end function new_string