functionstrippure
pure character(len=stripped_length(s)) function strip(s) result(t)
s without leading and trailing whitespace.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| s | character(len=*) | in | the string |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| t | character(len=stripped_length(s)) | private |
This and the other functions here that are used while parsing give their results an explicit
length: gfortran keeps the length of a deferred-length result in static storage, so it is not
safe in parallel regions (see example/slen_race.f90).
Called by
- admonition_block
- admonition_start
- collect_abbreviations
- collect_definitions
- definition_block
- doxygen_meta
- doxygen_params
- expand_file_includes
- hash_header
- include_name
- inline_code
- is_attribute_statement
- is_setext
- link_target
- mark_common_members
- match_key
- open_unit
- paragraph
- parse_int
- parse_metadata
- parse_procedure_header
- parse_type
- preprocessor_command
- read_attribute_statement
- read_binding
- read_common
- read_namelist
- read_submodule
- read_type_statement
- read_use
- read_use_spec
- remove_markdown_attribute
- render_code
- render_node
- row_cells
- set_doc
- set_map
- setext_header
- split_attributes
- stash_fenced_code
- stash_html_blocks
- top_split
Source
Show the code
pure function strip(s) result(t)
character(len=*), intent(in) :: s !! the string
character(len=stripped_length(s)) :: t
integer :: a
a = verify(s, WHITESPACE)
if (a > 0) t = s(a:)
end function strip