From d729c679a9f3c83c2b9bab3f8573ee9ef9626573 Mon Sep 17 00:00:00 2001 From: Robert Hallberg Date: Mon, 11 Apr 2022 06:46:00 -0400 Subject: [PATCH] +Remove append_substring Removed the unused and unnecessary function append_substring. All answers are bitwise identical, but an unused public interface is being eliminated. --- src/framework/MOM_string_functions.F90 | 29 -------------------------- 1 file changed, 29 deletions(-) diff --git a/src/framework/MOM_string_functions.F90 b/src/framework/MOM_string_functions.F90 index ddc1b41290..5c04a77b7d 100644 --- a/src/framework/MOM_string_functions.F90 +++ b/src/framework/MOM_string_functions.F90 @@ -17,7 +17,6 @@ module MOM_string_functions public extract_real public remove_spaces public slasher -public append_substring contains @@ -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.