libsim Versione 7.1.11
Tipi di dato | Funzioni/Subroutine
Riferimenti per il modulo char_utilities

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.
 
elemental real function, public c2r (string)
 Convert a character string to a real value if possible.
 
elemental double precision function, public c2d (string)
 Convert a character string to a double value if possible.
 
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.
 
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.
 
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.
 
character(len(input_string)) function, public uppercase (input_string)
 Convert a CHARACTER variable to uppercase.
 
character(len(input_string)) function, public lowercase (input_string)
 Convert a CHARACTER variable to lowercase.
 
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).
 
elemental integer function, public l_nblnk (input_string, blnk)
 Return the index of last character in input_string which is not a blank space.
 
elemental integer function, public f_nblnk (input_string, blnk)
 Return the index of first character in input_string which is not a blank space.
 
integer function, public word_split (input_string, word_start, word_end, sep)
 Split a line into words at a predefined character (default blank).
 
type(line_split) function, public line_split_new (line, ncols)
 Constructor for the line_split class.
 
integer function, public line_split_get_nlines (this)
 Return the number of lines over which the input line was splitted.
 
character(len=size(this%paragraph, 1)) function, public line_split_get_line (this, nline)
 Return the nline-th line obtained after splitting.
 
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.
 
character(len(input_string)) function, public suffixname (input_string)
 Return the suffix of a filename.
 
elemental character(len=len(in)) function, public wash_char (in, goodchar, badchar)
 Remove the requested characters from a string.
 
logical function, dimension(size(string)) string_match_v (string, pattern)
 Tries to match the given string with the pattern (array version).
 
recursive logical function string_match (string, pattern)
 Tries to match the given string with the pattern.
 
subroutine progress_line_update_d (this, val)
 Update a progress line with a new value.
 
subroutine progress_line_update_i (this, val)
 Update a progress line with a new value.
 
subroutine progress_line_alldone (this)
 Close artificially the progress_line object.
 

Descrizione dettagliata

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.


Generated with Doxygen.