subroutinetakepure
pure subroutine take(b, text)
Move the text of b to text.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| b | type(buffer_t) | inout | the buffer | |
| text | character(len=:) | out | allocatable | its text |
Called by
- arithmetic
- call_builtin
- call_macro
- call_method
- code_block_html
- collect_definitions
- describe
- entity_page
- evaluate_fstring
- explained_badge
- fold_output
- form_key
- format_string
- fypp_process
- index_page
- insert_toc
- list_page
- make_footer
- markdown_to_html
- names_page
- normalize_lines
- parse_fstring
- parse_primary
- plain_text
- rank_label
- read_line_directive
- read_string
- render_call
- render_heading
- search_page
- sidebar_script
- stash_fenced_code
- stash_html_blocks
- static_page
- substitute_aliases
- unique_id
- unstash
- write_site
Source
Show the code
pure subroutine take(b, text)
type(buffer_t), intent(inout) :: b !! the buffer
character(len=:), allocatable, intent(out) :: text !! its text
if (allocated(b%s)) then
text = b%s(1:b%n)
else
text = ''
end if
b%n = 0
end subroutine take