Skip to content

Commit e5178bc

Browse files
committed
Add pad_string function to string_mod
1 parent 60375d8 commit e5178bc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/string_mod.F90

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module string_mod
55
private
66

77
public to_string
8+
public pad_string
89

910
interface to_string
1011
module procedure integer1_to_string
@@ -119,4 +120,14 @@ function logical_to_string(x) result(res)
119120

120121
end function logical_to_string
121122

123+
function pad_string(x, w) result(res)
124+
125+
character(*), intent(in) :: x
126+
integer, intent(in) :: w
127+
character(w) res
128+
129+
res = x
130+
131+
end function pad_string
132+
122133
end module string_mod

0 commit comments

Comments
 (0)