Manual Reference Pages  - isblank (3m_unicode)

NAME

isblank(3f) - [M_unicode:COMPARE] returns .true. if character is a Unicode or ASCII-7 blank character (space or horizontal tab) . (LICENSE:MIT)

CONTENTS

Synopsis
Description
Options
Returns
Examples
Author
License

SYNOPSIS

elemental function isblank(onechar)

    type(unicode_type),intent(in)   :: string
    !or
    character(len=*,intent(in)      :: characters

logical :: isblank

DESCRIPTION

isblank(3f) returns .true. if all characters are a blank character (ASCII-7 space or Unicode blank character) or horizontal tab.

OPTIONS

str variable to test

RETURNS

isblank
  logical value returns true if character is a "blank" ( an ASCII space or Unicode blank) or horizontal tab character.

EXAMPLES

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)]

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

Results:

   ISBLANK:  9 32

AUTHOR

John S. Urban

LICENSE

    MIT