|
fortran-strings 1.3.0
Fortran library of functions for common string manipulations
|
Functions/Subroutines | |
| integer function | str_count (str, substr, match_case) |
| Count the occurrences of a substring in a string. | |
| character(len=:) function, allocatable | str_replace (str, old, new) |
| Replace a substring with another substring within a parent string. | |
| character(len=:) function, allocatable | str_upper (str) |
| Convert all letters to uppercase. | |
| character(len=:) function, allocatable | str_lower (str) |
| Convert all letters to lowercase. | |
| character(len=:) function, allocatable | str_split (str, delim, col) |
| Split string based on a character delimiter and return string given by the column number. | |
| character(len=:) function, allocatable | str_uniq (str, delim) |
| Removed duplicative entries from a delimited string. | |
| character(len=:) function, allocatable | str_zfill (str, width) |
| Pad a string with zeroes ("0") to specified width. If width is <= input string width, then the original string is returned. | |
| character(len=:) function, allocatable | str_center (str, width, fillchar) |
| Center a string to a specified width. The default character to fill in the centered string is a blank character. | |
| character(len=:) function, allocatable | str_reverse (str) |
| Reverse a string. | |
| logical function | str_test (str, substr, match_case) |
| Return .true. if substr is in str, .false. otherwise. | |
| character(len=:) function, allocatable | str_swapcase (str) |
| Return str with case of letters swapped. | |
| character(len=:) function, allocatable strings::str_center | ( | character(len=*), intent(in) | str, |
| integer, intent(in) | width, | ||
| character(len=1), intent(in), optional | fillchar ) |
Center a string to a specified width. The default character to fill in the centered string is a blank character.
| [in] | str | - string to work on |
| [in] | width | - width of centered string |
| [in] | fillchar | - character to fill centered string. [OPTIONAL] |
| integer function strings::str_count | ( | character(len=*), intent(in) | str, |
| character(len=*), intent(in) | substr, | ||
| logical, intent(in), optional | match_case ) |
Count the occurrences of a substring in a string.
| [in] | str | - string to count from |
| [in] | substr | - substring to count |
| [in] | match_case | - use case sensitivity (.true.) or not (.false. [DEFAULT]) [OPTIONAL] |
| character(len=:) function, allocatable strings::str_lower | ( | character(len=*), intent(in) | str | ) |
Convert all letters to lowercase.
| [in] | str | - string to work on |
| character(len=:) function, allocatable strings::str_replace | ( | character(len=*), intent(in) | str, |
| character(len=*), intent(in) | old, | ||
| character(len=*), intent(in) | new ) |
Replace a substring with another substring within a parent string.
| [in] | str | - string to work on |
| [in] | old | - string to replace |
| [in] | new | - string to substritute from old. |
| character(len=:) function, allocatable strings::str_reverse | ( | character(len=*), intent(in) | str | ) |
Reverse a string.
| [in] | str | - string to work on |
| character(len=:) function, allocatable strings::str_split | ( | character(len=*), intent(in) | str, |
| character(len=1), intent(in) | delim, | ||
| integer, intent(in) | col ) |
Split string based on a character delimiter and return string given by the column number.
| [in] | str | - string to work on |
| [in] | delim | - character delimiter |
| [in] | col | - delimited column to return |
| character(len=:) function, allocatable strings::str_swapcase | ( | character(len=*), intent(in) | str | ) |
Return str with case of letters swapped.
| [in] | str | - input string |
| logical function strings::str_test | ( | character(len=*), intent(in) | str, |
| character(len=*), intent(in) | substr, | ||
| logical, intent(in), optional | match_case ) |
Return .true. if substr is in str, .false. otherwise.
| [in] | str | - string to work on |
| [in] | substr | - string to search for in str |
| [in] | match_case | - use case sensitivity (.true.) or not (.false. [DEFAULT]) [OPTIONAL] |
| character(len=:) function, allocatable strings::str_uniq | ( | character(len=*), intent(in) | str, |
| character(len=1), intent(in) | delim ) |
Removed duplicative entries from a delimited string.
| [in] | str | - string to work on |
| [in] | delim | - character delimiter |
| character(len=:) function, allocatable strings::str_upper | ( | character(len=*), intent(in) | str | ) |
Convert all letters to uppercase.
| [in] | str | - string to work on |
| character(len=:) function, allocatable strings::str_zfill | ( | character(len=*), intent(in) | str, |
| integer, intent(in) | width ) |
Pad a string with zeroes ("0") to specified width. If width is <= input string width, then the original string is returned.
| [in] | str | - string to work on |
| [in] | width | - width of padded string |