Skip to content

Commit 0533f7c

Browse files
committed
Merge branch 'chomp' of github.com:wassup05/stdlib into chomp
2 parents c81f267 + 0ad3756 commit 0533f7c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/stdlib_strings.fypp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,9 @@ contains
310310

311311
if (last <= 0) then
312312
chomped_string = ''
313-
return
314-
end if
315-
316-
chomped_string = string(1:last)
313+
else
314+
chomped_string = string(1:last)
315+
end if
317316

318317
end function chomp_substring_char_char
319318

0 commit comments

Comments
 (0)