str_strip Function

public pure function str_strip(str, chars, ends) result(ostr)

Returns a copy of string str with the leading and trailing characters removed. The chars argument is a string specifying the set of characters to be removed. The chars argument is not a prefix or suffix; rather, all combinations of its values are stripped. If ends = 'l', only leading characters are removed, if ends = 'r', only trailing characters are removed, and if ends = 'b' both leading and trailing characters are removed.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: str
character(len=*), intent(in) :: chars
character(len=1), intent(in) :: ends

{'l', 'r', 'b'}

Return Value character(len=:), allocatable


Contents

None