Sanitize defaults values.
It is necessary to sanitize the default values of non-passed, optional CLA.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(command_line_argument), | intent(inout) | :: | self |
CLAsG data. |
subroutine sanitize_defaults(self) !< Sanitize defaults values. !< !< It is necessary to *sanitize* the default values of non-passed, optional CLA. class(command_line_argument), intent(inout) :: self !< CLAsG data. ! if (.not.self%is_passed) then if (allocated(self%def)) then ! strip leading and trailing white spaces self%def = wstrip(self%def) if (allocated(self%nargs)) then ! replace white space separator with FLAP ARGS_SEP self%def = unique(string=self%def, substring=' ') self%def = replace_all(string=self%def, substring=' ', restring=ARGS_SEP) endif endif ! endif endsubroutine sanitize_defaults