fdoc

functionstripped_lengthpureprivate

pure integer function stripped_length(s)

Length of s without leading and trailing whitespace.

Arguments

NameTypeIntentAttributesDescription
scharacter(len=*)in

the string

Result

NameTypeAttributesDescription
stripped_lengthinteger

Source

Show the code
pure integer function stripped_length(s)
    character(len=*), intent(in) :: s   !! the string
    integer :: a
    a = verify(s, WHITESPACE)
    stripped_length = 0
    if (a > 0) stripped_length = verify(s, WHITESPACE, back=.true.) - a + 1
end function stripped_length