string_utils Module

Leaf module (no use dependencies) holding the ASCII case helpers that were previously copy-defined in config, config_2d, and config_schema. Two variants are kept deliberately:

  • to_lower — lowercase only, preserving length and surrounding whitespace.
  • lowercase_token — left-justify + trim, then lowercase (token normalisation for namelist values and schema keys).

Functions

public pure function to_lower(s) result(t)

Return a lowercased copy of an ASCII string, preserving length and whitespace.

Arguments

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

Return Value character(len=len)

public pure function lowercase_token(value) result(normalized)

Return a left-justified, trimmed, lowercased copy of value. Pure: has no side effects (usable inside other pure procedures).

Arguments

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

Return Value character(len=len)