libsim
Versione7.2.3
|
Utilities for CHARACTER variables. Continua...
Tipi di dato | |
interface | delete |
Destructor for the line_split class. Continua... | |
type | line_split |
Class that allows splitting a long line into shorter lines of equal length at the occurrence of a specific character (typically a blank space). Continua... | |
interface | match |
Tries to match the given string with the pattern Result: .true. Continua... | |
type | progress_line |
Class to print a progress bar on the screen. Continua... | |
interface | t2c |
Set of functions that return a trimmed CHARACTER representation of the input variable. Continua... | |
interface | to_char |
Set of functions that return a CHARACTER representation of the input variable. Continua... | |
Funzioni/Subroutine | |
elemental integer function, public | c2i (string) |
Convert a character string to an integer value if possible. Continua... | |
elemental real function, public | c2r (string) |
Convert a character string to a real value if possible. Continua... | |
elemental double precision function, public | c2d (string) |
Convert a character string to a double value if possible. Continua... | |
integer(kind=int_b) function, dimension(len(fchar)+1), public | fchar_to_cstr (fchar) |
Converts a CHARACTER variable into a string which can be directly passed to a C function requiring a null-terminated const char* (input) argument. Continua... | |
subroutine, public | fchar_to_cstr_alloc (fchar, pcstr) |
Converts a CHARACTER variable into a string which can be directly passed to a C function requiring a null-terminated char* (input/output) argument. Continua... | |
character(len=size(cstr) -1) function, public | cstr_to_fchar (cstr) |
Converts a null-terminated C-style string into a Fortran CHARACTER variable of the same length, the null termination character is removed. Continua... | |
character(len(input_string)) function, public | uppercase (Input_String) |
Convert a CHARACTER variable to uppercase. Continua... | |
character(len(input_string)) function, public | lowercase (Input_String) |
Convert a CHARACTER variable to lowercase. Continua... | |
elemental character(len=len(input_string)) function, public | align_center (input_string) |
Returns input_string centered, i.e. with an equal number of leading and trailing blanks (±1 if they are odd). Continua... | |
elemental integer function, public | l_nblnk (input_string, blnk) |
Return the index of last character in input_string which is not a blank space. Continua... | |
elemental integer function, public | f_nblnk (input_string, blnk) |
Return the index of first character in input_string which is not a blank space. Continua... | |
integer function, public | word_split (input_string, word_start, word_end, sep) |
Split a line into words at a predefined character (default blank). Continua... | |
type(line_split) function, public | line_split_new (line, ncols) |
Constructor for the line_split class. Continua... | |
integer function, public | line_split_get_nlines (this) |
Return the number of lines over which the input line was splitted. Continua... | |
character(len=size(this%paragraph, 1)) function, public | line_split_get_line (this, nline) |
Return the nline-th line obtained after splitting. Continua... | |
integer function, public | default_columns () |
Return the number of columns in the terminal, if available it is taken from the COLUMNS environment variable (it may be necessary to execute export COLUMNS before running the program, in order for this to work), otherwise it is set to 80. Continua... | |
character(len(input_string)) function, public | suffixname (Input_String) |
Return the suffix of a filename. Continua... | |
elemental character(len=len(in)) function, public | wash_char (in, goodchar, badchar) |
Remove the requested characters from a string. Continua... | |
logical function, dimension(size(string)) | string_match_v (string, pattern) |
Tries to match the given string with the pattern (array version). Continua... | |
recursive logical function | string_match (string, pattern) |
Tries to match the given string with the pattern. Continua... | |
subroutine | progress_line_update_d (this, val) |
Update a progress line with a new value. Continua... | |
subroutine | progress_line_update_i (this, val) |
Update a progress line with a new value. Continua... | |
subroutine | progress_line_alldone (this) |
Close artificially the progress_line object. Continua... | |
Utilities for CHARACTER variables.
This module is a collection of all-purpose utilities connected to the use of CHARACTER variables, and text handling in general.