chars Function

private pure function chars(self) result(raw)

Arguments

TypeIntentOptionalAttributesName
class(string), intent(in) :: self

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


Contents

Source Code


Source Code

   pure function chars(self) result(raw)
   !< Return the raw characters data.
   !<
   !<```fortran
   !< type(string) :: astring
   !< astring = 'say all Hello WorLD!'
   !< print '(L1)', astring%chars()=='say all Hello WorLD!'
   !<```
   !=> T <<<
   class(string), intent(in)              :: self !< The string.
   character(kind=CK, len=:), allocatable :: raw  !< Raw characters data.

   if (allocated(self%raw)) then
     raw = self%raw
   else
     raw = ''
   endif
   endfunction chars