![]() |
(git:d18deda)
|
Utilities for string manipulations. More...
Data Types | |
interface | s2a |
Functions/Subroutines | |
elemental integer function, public | typo_match (string, typo_string) |
returns a non-zero positive value if typo_string equals string apart from a few typos. It is case sensitive, apart from typos. | |
pure character(len=size(array)) function, public | a2s (array) |
Converts a character-array into a string. | |
subroutine, public | ascii_to_string (nascii, string) |
Convert a sequence of integer numbers (ASCII code) to a string. Blanks are inserted for invalid ASCII code numbers. | |
subroutine, public | compress (string, full) |
Eliminate multiple space characters in a string. If full is .TRUE., then all spaces are eliminated. | |
subroutine, public | integer_to_string (inumber, string) |
Converts an integer number to a string. The WRITE statement will return an error message, if the number of digits of the integer number is larger the than the length of the supplied string. | |
subroutine, public | string_to_ascii (string, nascii) |
Convert a string to sequence of integer numbers. | |
subroutine, public | remove_word (string) |
remove a word from a string (words are separated by white spaces) | |
character(len=2 *len(inp_string)) function, public | substitute_special_xml_tokens (inp_string) |
Substitutes the five predefined XML entities: &, <, >, ', and ". | |
elemental subroutine, public | lowercase (string) |
Convert all upper case characters in a string to lower case. | |
elemental subroutine, public | uppercase (string) |
Convert all lower case characters in a string to upper case. | |
elemental subroutine, public | xstring (string, ia, ib) |
... | |
elemental logical function, public | str_comp (str1, str2) |
... | |
elemental logical function, public | is_whitespace (testchar) |
returns .true. if the character passed is a whitespace char. | |
elemental subroutine, public | strip_control_codes (string) |
Strip control codes and extended characters from a string, i.e. replace them with blanks. | |
integer function, public | strlcpy_c2f (fstring, cstring) |
Copy the content of a \0-terminated C-string to a finite-length Fortran string. | |
Variables | |
character(len=1), parameter, public | newline = ACHAR(10) |
Utilities for string manipulations.
elemental integer function, public string_utilities::typo_match | ( | character(len=*), intent(in) | string, |
character(len=*), intent(in) | typo_string | ||
) |
returns a non-zero positive value if typo_string equals string apart from a few typos. It is case sensitive, apart from typos.
string | ... |
typo_string | ... |
Definition at line 70 of file string_utilities.F.
pure character(len=size(array)) function, public string_utilities::a2s | ( | character, dimension(:), intent(in) | array | ) |
Converts a character-array into a string.
array | ... |
Definition at line 134 of file string_utilities.F.
subroutine, public string_utilities::ascii_to_string | ( | integer, dimension(:), intent(in) | nascii, |
character(len=*), intent(out) | string | ||
) |
Convert a sequence of integer numbers (ASCII code) to a string. Blanks are inserted for invalid ASCII code numbers.
nascii | ... |
string | ... |
Definition at line 3162 of file string_utilities.F.
subroutine, public string_utilities::compress | ( | character(len=*), intent(inout) | string, |
logical, intent(in), optional | full | ||
) |
Eliminate multiple space characters in a string. If full is .TRUE., then all spaces are eliminated.
string | ... |
full | ... |
Definition at line 3190 of file string_utilities.F.
subroutine, public string_utilities::integer_to_string | ( | integer, intent(in) | inumber, |
character(len=*), intent(out) | string | ||
) |
Converts an integer number to a string. The WRITE statement will return an error message, if the number of digits of the integer number is larger the than the length of the supplied string.
inumber | ... |
string | ... |
Definition at line 3238 of file string_utilities.F.
subroutine, public string_utilities::string_to_ascii | ( | character(len=*), intent(in) | string, |
integer, dimension(:), intent(out) | nascii | ||
) |
Convert a string to sequence of integer numbers.
string | ... |
nascii | ... |
Definition at line 3254 of file string_utilities.F.
subroutine, public string_utilities::remove_word | ( | character(len=*), intent(inout) | string | ) |
remove a word from a string (words are separated by white spaces)
string | ... |
Definition at line 3274 of file string_utilities.F.
character(len=2*len(inp_string)) function, public string_utilities::substitute_special_xml_tokens | ( | character(len=*), intent(in) | inp_string | ) |
Substitutes the five predefined XML entities: &, <, >, ', and ".
inp_string | ... |
Definition at line 3298 of file string_utilities.F.
elemental subroutine, public string_utilities::lowercase | ( | character(len=*), intent(inout) | string | ) |
Convert all upper case characters in a string to lower case.
string | ... |
Definition at line 3340 of file string_utilities.F.
elemental subroutine, public string_utilities::uppercase | ( | character(len=*), intent(inout) | string | ) |
Convert all lower case characters in a string to upper case.
string | ... |
Definition at line 3361 of file string_utilities.F.
elemental subroutine, public string_utilities::xstring | ( | character(len=*), intent(in) | string, |
integer, intent(out) | ia, | ||
integer, intent(out) | ib | ||
) |
...
string | ... |
ia | ... |
ib | ... |
Definition at line 3381 of file string_utilities.F.
elemental logical function, public string_utilities::str_comp | ( | character(len=*), intent(in) | str1, |
character(len=*), intent(in) | str2 | ||
) |
...
str1 | ... |
str2 | ... |
Definition at line 3402 of file string_utilities.F.
elemental logical function, public string_utilities::is_whitespace | ( | character(len=1), intent(in) | testchar | ) |
returns .true. if the character passed is a whitespace char.
testchar | ... |
Definition at line 3425 of file string_utilities.F.
elemental subroutine, public string_utilities::strip_control_codes | ( | character(len=*), intent(inout) | string | ) |
Strip control codes and extended characters from a string, i.e. replace them with blanks.
string | ... |
Definition at line 3440 of file string_utilities.F.
integer function, public string_utilities::strlcpy_c2f | ( | character(len=*), intent(out) | fstring, |
character(len=1, kind=c_char), dimension(*), intent(in) | cstring | ||
) |
Copy the content of a \0-terminated C-string to a finite-length Fortran string.
The content of the new string may be truncated if the number of characters before the '\0' in the source string exceed the length of the destination string. Based on the strlcpy C function.
fstring | destination string |
cstring | source string |
Definition at line 3463 of file string_utilities.F.
character(len=1), parameter, public string_utilities::newline = ACHAR(10) |
Definition at line 29 of file string_utilities.F.