Skip to content

Commit

Permalink
+Remove append_substring
Browse files Browse the repository at this point in the history
  Removed the unused and unnecessary function append_substring.  All answers
are bitwise identical, but an unused public interface is being eliminated.
  • Loading branch information
Hallberg-NOAA authored and marshallward committed Apr 12, 2022
1 parent d8bc963 commit d729c67
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/framework/MOM_string_functions.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module MOM_string_functions
public extract_real
public remove_spaces
public slasher
public append_substring

contains

Expand Down Expand Up @@ -419,34 +418,6 @@ function slasher(dir)
endif
end function slasher

!> append a string (substring) to another string (string_in) and return the
!! concatenated string (string_out)
function append_substring(string_in, substring) result(string_out)
character(len=*), intent(in) :: string_in !< input string
character(len=*), intent(in) :: substring !< string to append string_in
! local
character(len=1024) :: string_out
character(len=1024) :: string_joined
integer :: string_in_length
integer :: substring_length

string_out = ''
string_joined = ''
string_in_length = 0
substring_length = 0

string_in_length = len_trim(string_in)
substring_length = len_trim(substring)

if (string_in_length > 0) then
if (substring_length > 0) then
string_joined = trim(string_in)//trim(substring)
string_out(1:len_trim(string_joined)) = trim(string_joined)
endif
endif

end function append_substring

!> \namespace mom_string_functions
!!
!! By Alistair Adcroft and Robert Hallberg, last updated Sept. 2013.
Expand Down

0 comments on commit d729c67

Please sign in to comment.