MOM6
MOM_string_functions.F90 File Reference

Go to the source code of this file.

Modules

module  mom_string_functions
 Handy functions for manipulating strings.
 

Functions/Subroutines

character(len=len(input_string)) function, public mom_string_functions::lowercase (input_string)
 Return a string in which all uppercase letters have been replaced by their lowercase counterparts. More...
 
character(len=len(input_string)) function, public mom_string_functions::uppercase (input_string)
 Return a string in which all uppercase letters have been replaced by their lowercase counterparts. More...
 
character(len=19) function, public mom_string_functions::left_int (i)
 Returns a character string of a left-formatted integer e.g. "123 " (assumes 19 digit maximum) More...
 
character(len=1320) function, public mom_string_functions::left_ints (i)
 Returns a character string of a comma-separated, compact formatted, integers e.g. "1, 2, 3, 4". More...
 
character(len=32) function, public mom_string_functions::left_real (val)
 Returns a left-justified string with a real formatted like '(G)'. More...
 
character(len=1320) function, public mom_string_functions::left_reals (r, sep)
 Returns a character string of a comma-separated, compact formatted, reals e.g. "1., 2., 5*3., 5.E2". More...
 
logical function mom_string_functions::isformattedfloatequalto (str, val)
 Returns True if the string can be read/parsed to give the exact value of "val". More...
 
character(len=120) function, public mom_string_functions::extractword (string, n)
 Returns the string corresponding to the nth word in the argument or "" if the string is not long enough. Both spaces and commas are interpreted as separators. More...
 
character(len=120) function, public mom_string_functions::extract_word (string, separators, n)
 Returns the string corresponding to the nth word in the argument or "" if the string is not long enough. Words are delineated by the mandatory separators argument. More...
 
integer function, public mom_string_functions::extract_integer (string, separators, n, missing_value)
 Returns the integer corresponding to the nth word in the argument. More...
 
real function, public mom_string_functions::extract_real (string, separators, n, missing_value)
 Returns the real corresponding to the nth word in the argument. More...
 
character(len=120) function, public mom_string_functions::remove_spaces (string)
 Returns string with all spaces removed. More...
 
logical function, public mom_string_functions::string_functions_unit_tests (verbose)
 Returns true if a unit test of string_functions fails. More...
 
logical function mom_string_functions::localtests (verbose, str1, str2)
 True if str1 does not match str2. False otherwise. More...
 
logical function mom_string_functions::localtesti (verbose, i1, i2)
 True if i1 is not equal to i2. False otherwise. More...
 
logical function mom_string_functions::localtestr (verbose, r1, r2)
 True if r1 is not equal to r2. False otherwise. More...
 
character(len=len(dir)+2) function, public mom_string_functions::slasher (dir)
 Returns a directory name that is terminated with a "/" or "./" if the argument is an empty string. More...