Skip to content

Commit c4fe0cc

Browse files
committed
Deploying to stdlib-fpm from @ 0bf8fd2 🚀
1 parent f52ff12 commit c4fe0cc

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/stdlib_string_type.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ elemental function concat_string_string(lhs, rhs) result(string)
10931093
type(string_type), intent(in) :: rhs
10941094
type(string_type) :: string
10951095

1096-
string%raw = maybe(rhs) // maybe(lhs)
1096+
string%raw = maybe(lhs) // maybe(rhs)
10971097

10981098
end function concat_string_string
10991099

test/test_string_operator.f90

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,15 @@ subroutine test_ne
9999
end subroutine test_ne
100100

101101
subroutine test_concat
102-
type(string_type) :: string
103-
104-
string = "Hello, "
105-
string = string // "World!"
106-
call check(len(string) == 13)
102+
type(string_type) :: a, b
103+
104+
a = "a"
105+
b = "b"
106+
call check( "a" // b == "ab" )
107+
call check( a // "b" == "ab" )
108+
call check( a // b == "ab" )
109+
call check( a // "" == "a" )
110+
call check( "" // b == "b" )
107111
end subroutine test_concat
108112

109113
end module test_string_operator

0 commit comments

Comments
 (0)