functionstarts_withpure
pure logical function starts_with(s, prefix)
True if s begins with prefix.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| s | character(len=*) | in | the string | |
| prefix | character(len=*) | in | the start wanted |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| starts_with | logical |
Called by
- admonition_block
- apply_one
- code_block
- collect_abbreviations
- collect_definitions
- doxygen_params
- expand_file_includes
- fence_language
- find_sources
- finish_settings
- glob_matches
- inline_angle
- link_target
- list_block
- list_items
- load_external_project
- loose_detab
- parse_args
- parse_block
- parse_type
- read_attribute_statement
- read_external
- read_type_statement
- read_use_spec
- render_code
- render_node
- row_cells
- sorts_before
- stash_html_blocks
- type_keyword
Source
Show the code
pure logical function starts_with(s, prefix)
character(len=*), intent(in) :: s !! the string
character(len=*), intent(in) :: prefix !! the start wanted
starts_with = len(s) >= len(prefix)
if (starts_with) starts_with = s(1:len(prefix)) == prefix
end function starts_with