chars Function

private pure function chars(self) result(raw)

Return the raw characters data.

 type(string) :: astring
 astring = 'say all Hello WorLD!'
 print '(L1)', astring%chars()=='say all Hello WorLD!'

Type Bound

string

Arguments

Type IntentOptional Attributes Name
class(string), intent(in) :: self

The string.

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

Raw characters data.


Called by

proc~~chars~~CalledByGraph proc~chars stringifor_string_t::string%chars proc~colorize_str stringifor_string_t::string%colorize_str proc~colorize_str->proc~chars proc~read_file~2 stringifor_string_t::string%read_file proc~read_file~2->proc~chars proc~read_lines~2 stringifor_string_t::string%read_lines proc~read_file~2->proc~read_lines~2 proc~read_line stringifor_string_t::string%read_line proc~read_line->proc~chars proc~write_file~2 stringifor_string_t::string%write_file proc~write_file~2->proc~chars proc~write_line stringifor_string_t::string%write_line proc~write_line->proc~chars proc~glob_string stringifor_string_t::string%glob_string proc~glob_string->proc~read_file~2 proc~read_lines~2->proc~read_line interface~glob stringifor_string_t::glob interface~glob->proc~glob_string proc~glob_character stringifor_string_t::string%glob_character interface~glob->proc~glob_character proc~glob_character->interface~glob program~volatile_doctest~16 volatile_doctest program~volatile_doctest~16->interface~glob program~volatile_doctest~69 volatile_doctest program~volatile_doctest~69->interface~glob program~volatile_doctest~80 volatile_doctest program~volatile_doctest~80->interface~glob

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