Skip to content

Commit e08d051

Browse files
committed
Apply suggestions from code review
ichar(" ") should be alloed.
1 parent 1a87696 commit e08d051

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stdlib_string_type.fypp

+2-2
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ contains
421421
type(string_type), intent(in) :: string
422422
integer :: ich
423423

424-
if (allocated(string%raw) .and. len_trim(string%raw) > 0) then
424+
if (allocated(string%raw) .and. len(string) > 0) then
425425
ich = ichar(string%raw(1:1))
426426
else
427427
ich = 0
@@ -435,7 +435,7 @@ contains
435435
type(string_type), intent(in) :: string
436436
integer :: ich
437437

438-
if (allocated(string%raw) .and. len_trim(string%raw) > 0) then
438+
if (allocated(string%raw) .and. len(string) > 0) then
439439
ich = iachar(string%raw(1:1))
440440
else
441441
ich = 0

0 commit comments

Comments
 (0)