functionfirst_line_ofpureprivate
pure character(len=merge(len(text),index(text,NL)-1,index(text,NL)==0)) function first_line_of(text) result(line)
The first line of text.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| text | character(len=*) | in | the text |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| line | character(len=merge(len(text),index(text,NL)-1,index(text,NL)==0)) | private |
Source
Show the code
pure function first_line_of(text) result(line)
character(len=*), intent(in) :: text !! the text
character(len=merge(len(text), index(text, NL) - 1, index(text, NL) == 0)) :: line
line = text
end function first_line_of