fdoc

functionfirst_wordpureprivate

pure character(len=merge(len(text),index(text,'')-1,index(text,'')==0)) function first_word(text) result(word)

The part of text before its first blank.

Arguments

NameTypeIntentAttributesDescription
textcharacter(len=*)in

the text

Result

NameTypeAttributesDescription
wordcharacter(len=merge(len(text),index(text,'')-1,index(text,'')==0))private

Source

Show the code
pure function first_word(text) result(word)
    character(len=*), intent(in) :: text    !! the text
    character(len=merge(len(text), index(text, ' ') - 1, index(text, ' ') == 0)) :: word
    word = text
end function first_word

Graphs

Called by