isblank(3f) - [M_unicode:COMPARE] returns .true. if character is a Unicode or ASCII-7 blank character (space or horizontal tab) . (LICENSE:MIT)
Synopsis
Description
Options
Returns
Examples
Author
License
elemental function isblank(onechar)
type(unicode_type),intent(in) :: string !or character(len=*,intent(in) :: characterslogical :: isblank
isblank(3f) returns .true. if all characters are a blank character (ASCII-7 space or Unicode blank character) or horizontal tab.
str variable to test
isblank logical value returns true if character is a "blank" ( an ASCII space or Unicode blank) or horizontal tab character.
Sample program:
program demo_isblank use M_unicode, only : isblank, unicode, ch=>character, unicode_type use M_unicode, only : assignment(=) implicit none integer :: i type(unicode_type) :: string_u character(len=1),parameter :: string_a(*)=[(char(i),i=0,127)]Results:write(*,(*(g0,1x)))ISBLANK PASSED TYPE(CHARACTER) : ,isblank(string_a)
string_u=unicode%SPACES write(*,(*(g0,1x)))ISBLANK PASSED TYPE(UNICODE_TYPE): ,isblank(string_u) write(*,(*(g0)))BLANKS: ,ch(string_u) write(*,(*(g0),1x))BLANKS: ,string_u%codepoint() end program demo_isblank
ISBLANK: 9 32
John S. Urban
