strings_equal Function

public pure function strings_equal(str1, str2) result(equal)

Compare two strings after trimming and adjusting (removing leading/trailing whitespace) Compare two strings for equality after trimming and adjusting (removing leading/trailing whitespace)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str1
character(len=*), intent(in) :: str2

Return Value logical


Called by

proc~~strings_equal~~CalledByGraph proc~strings_equal strings_equal proc~build_molecular_basis build_molecular_basis proc~build_molecular_basis->proc~strings_equal proc~find_unique_strings find_unique_strings proc~build_molecular_basis->proc~find_unique_strings proc~parse_element_basis parse_element_basis proc~build_molecular_basis->proc~parse_element_basis proc~count_shells_for_element count_shells_for_element proc~count_shells_for_element->proc~strings_equal proc~fill_element_basis fill_element_basis proc~fill_element_basis->proc~strings_equal proc~find_unique_strings->proc~strings_equal proc~parse_element_basis->proc~count_shells_for_element proc~parse_element_basis->proc~fill_element_basis

Source Code

   pure function strings_equal(str1, str2) result(equal)
      !! Compare two strings for equality after trimming and adjusting (removing leading/trailing whitespace)
      character(len=*), intent(in) :: str1, str2
      logical :: equal
      equal = trim(adjustl(str1)) == trim(adjustl(str2))
   end function strings_equal