|
TUV-x
|
The string_t type and related functions. More...
Data Types | |
| type | string_t |
| Generic string type. More... | |
| interface | to_char |
| Converts values to character arrays. More... | |
Functions/Subroutines | |
| subroutine | string_assign_char (to, from) |
| Assigns a string from a character array. | |
| subroutine | string_assign_int (to, from) |
| Assigns a string from an integer. | |
| subroutine | string_assign_real (to, from) |
| Assigns a string from a real number. | |
| subroutine | string_assign_double (to, from) |
| Assigns a string from a double precision real number. | |
| subroutine | string_assign_logical (to, from) |
| Assigns a string from a logical. | |
| subroutine | char_assign_string (to, from) |
| Assign a character array from a string. | |
| subroutine | real_assign_string (to, from) |
| Assign a real from a string. | |
| subroutine | double_assign_string (to, from) |
| Assign a double precision real from a string. | |
| subroutine | int_assign_string (to, from) |
| Assign an integer from a string. | |
| subroutine | logical_assign_string (to, from) |
| Assigns a logical from a string. | |
| elemental type(string_t) function | string_join_string (a, b) |
| Joins a string to a string. | |
| elemental type(string_t) function | string_join_char (a, b) |
| Joins a string to a character array. | |
| elemental type(string_t) function | string_join_int (a, b) |
| Joins a string to an integer. | |
| elemental type(string_t) function | string_join_real (a, b) |
| Joins a string to a real number. | |
| elemental type(string_t) function | string_join_double (a, b) |
| Joins a string to a double precision real number. | |
| elemental type(string_t) function | string_join_logical (a, b) |
| Joins a string to a logical. | |
| logical elemental function | string_equals_string (a, b) |
| Compares a string to a string for equality. | |
| logical elemental function | string_equals_char (a, b) |
| Compares a string to a character array for equality. | |
| logical elemental function | string_equals_int (a, b) |
| Compares a string to a integer for equality. | |
| logical elemental function | string_equals_real (a, b) |
| Compares a string to a real number for equality. | |
| logical elemental function | string_equals_double (a, b) |
| Compares a string to a double-precision real number for equality. | |
| logical elemental function | string_equals_logical (a, b) |
| Compares a string to a logical for equality. | |
| logical elemental function | string_not_equals_string (a, b) |
| Compares a string to a string for equality. | |
| logical elemental function | string_not_equals_char (a, b) |
| Compares a string to a character array for equality. | |
| logical elemental function | string_not_equals_int (a, b) |
| Compares a string to a integer for equality. | |
| logical elemental function | string_not_equals_real (a, b) |
| Compares a string to a real number for equality. | |
| logical elemental function | string_not_equals_double (a, b) |
| Compares a string to a double-precision real number for equality. | |
| logical elemental function | string_not_equals_logical (a, b) |
| Compares a string to a logical for equality. | |
| elemental integer function | length (this) |
| Returns the length of the string. | |
| type(string_t) function | to_upper (this) |
| Converts a string to upper case. | |
| type(string_t) function | to_lower (this) |
| Converts a string to lower case. | |
| type(string_t) function | substring (this, start_index, length) |
| Returns a substring. | |
| type(string_t) function, dimension(:), allocatable | split_char (this, splitter, compress) |
| Splits a string on a substring. | |
| type(string_t) function, dimension(:), allocatable | split_string (this, splitter, compress) |
| Splits a string on a substring. | |
| type(string_t) function | replace (this, from, to) |
| Replaces substrings within a string. | |
| character(len=:) function, allocatable | string_to_char (this) |
| Converts a string to a character array. | |
| elemental type(string_t) function | char_join_string (a, b) |
| Joins a character array to a string. | |
| elemental type(string_t) function | int_join_string (a, b) |
| Joins an integer to a string. | |
| elemental type(string_t) function | real_join_string (a, b) |
| Joins a real number to a string. | |
| elemental type(string_t) function | double_join_string (a, b) |
| Joins a double precision real number to a string. | |
| elemental type(string_t) function | logical_join_string (a, b) |
| Joins a logical to a string. | |
| logical elemental function | char_equals_string (a, b) |
| Compares a character array to a string for equality. | |
| logical elemental function | int_equals_string (a, b) |
| Compares an integer to a string for equality. | |
| logical elemental function | real_equals_string (a, b) |
| Compares a real number to a string for equality. | |
| logical elemental function | double_equals_string (a, b) |
| Compares a double-precision real number to a string for equality. | |
| logical elemental function | logical_equals_string (a, b) |
| Compares a logical to a string for equality. | |
| logical elemental function | char_not_equals_string (a, b) |
| Compares a character array to a string for equality. | |
| logical elemental function | int_not_equals_string (a, b) |
| Compares an integer to a string for equality. | |
| logical elemental function | real_not_equals_string (a, b) |
| Compares a real number to a string for equality. | |
| logical elemental function | double_not_equals_string (a, b) |
| Compares a double-precision real number to a string for equality. | |
| logical elemental function | logical_not_equals_string (a, b) |
| Compares a logical to a string for equality. | |
| integer function | pack_size (this, comm) |
| Returns the size of a binary buffer required to pack the string. | |
| subroutine | mpi_pack (this, buffer, position, comm) |
| Packs the string onto a character buffer. | |
| subroutine | mpi_unpack (this, buffer, position, comm) |
| Unpacks a string from a character buffer. | |
| character(len=kconvertcharlength) function | int_to_char (val) |
| Converts an integer to a char array. | |
| character(len=kconvertcharlength) function | real_to_char (val) |
| Converts a real number to a char array. | |
| character(len=kconvertcharlength) function | double_to_char (val) |
| Converts a double-precision real number to a char array. | |
| character(len=kconvertcharlength) function | complex_real_to_char (val) |
| Converts a real complex number to a char array. | |
| character(len=kconvertcharlength) function | complex_double_to_char (val) |
| Converts a double-precision real complex number to a char array. | |
| character(len=kconvertcharlength) function | logical_to_char (val) |
| Converts a logical to a char array. | |
| subroutine, public | output_table (header, table, file_unit) |
| Output tabular data to a given file unit. | |
| subroutine | assert_msg (code, condition, error_message) |
| Local assert function. | |
Variables | |
| integer(kind=musica_ik), parameter | kconvertcharlength = 100 |
| Length of character array for to_char conversions. | |
The string_t type and related functions.
|
private |
Local assert function.
| [in] | code | Unique code for the assertion |
| [in] | condition | Condition to evaluate |
| [in] | error_message | Message to display on failure |
|
private |
Assign a character array from a string.
| [in,out] | to | Variable to assign |
| [in] | from | String to assign from |
|
private |
Compares a character array to a string for equality.
| [in] | a | Character array a |
| [in] | b | String b |
|
private |
Joins a character array to a string.
| [in] | a | Character array to join |
| [in] | b | String to join |
|
private |
Compares a character array to a string for equality.
| [in] | a | Character array a |
| [in] | b | String b |
|
private |
Converts a double-precision real complex number to a char array.
| [in] | val | Value to convert |
|
private |
Converts a real complex number to a char array.
| [in] | val | Value to convert |
|
private |
Assign a double precision real from a string.
| [in,out] | to | Variable to assign |
| [in] | from | String to assign from |
|
private |
Compares a double-precision real number to a string for equality.
| [in] | a | Double-precision real number a |
| [in] | b | String b |
|
private |
Joins a double precision real number to a string.
| [in] | a | Double precision real number to join |
| [in] | b | String to join |
|
private |
Compares a double-precision real number to a string for equality.
| [in] | a | Double-precition real number a |
| [in] | b | String b |
|
private |
Converts a double-precision real number to a char array.
| [in] | val | Value to convert |
|
private |
Assign an integer from a string.
| [in,out] | to | Variable to assign |
| [in] | from | String to assign from |
|
private |
Compares an integer to a string for equality.
| [in] | a | Integer a |
| [in] | b | String b |
|
private |
Joins an integer to a string.
| [in] | a | Integer to join |
| [in] | b | String to join |
|
private |
Compares an integer to a string for equality.
| [in] | a | Integer a |
| [in] | b | String b |
|
private |
Converts an integer to a char array.
| [in] | val | Value to convert |
|
private |
Returns the length of the string.
| [in] | this | String |
|
private |
Assigns a logical from a string.
| [in,out] | to | Variable to assign |
| [in] | from | String to assign from |
|
private |
Compares a logical to a string for equality.
| [in] | a | Logical a |
| [in] | b | String b |
|
private |
Joins a logical to a string.
| [in] | a | Logical to join |
| [in] | b | String to join |
|
private |
Compares a logical to a string for equality.
| [in] | a | Logical a |
| [in] | b | String b |
|
private |
Converts a logical to a char array.
| [in] | val | Value to convert |
|
private |
Packs the string onto a character buffer.
| [in] | this | String to pack |
| [in,out] | buffer | Memory buffer |
| [in,out] | position | Current buffer position |
| [in] | comm | MPI communicator |
|
private |
Unpacks a string from a character buffer.
| [out] | this | String to be unpacked |
| [in,out] | buffer | Memory buffer |
| [in,out] | position | Current buffer position |
| [in] | comm | MPI communicator |
| subroutine, public musica_string::output_table | ( | type(string_t), dimension(:), intent(in) | header, |
| type(string_t), dimension(:,:), intent(in) | table, | ||
| integer(kind=musica_ik), intent(in) | file_unit ) |
Output tabular data to a given file unit.
| [in] | header | Table header |
| [in] | table | Table data (column, row) |
| [in] | file_unit | File unit |
|
private |
Assign a real from a string.
| [in,out] | to | Variable to assign |
| [in] | from | String to assign from |
|
private |
Compares a real number to a string for equality.
| [in] | a | Real number a |
| [in] | b | String b |
|
private |
Joins a real number to a string.
| [in] | a | Real number to join |
| [in] | b | String to join |
|
private |
Compares a real number to a string for equality.
| [in] | a | Real number a |
| [in] | b | String b |
|
private |
Converts a real number to a char array.
| [in] | val | Value to convert |
|
private |
Replaces substrings within a string.
Example:
Output:
| this | Original string | |
| [in] | from | Sub-string to replace |
| [in] | to | Replacement string |
|
private |
Splits a string on a substring.
Example:
Output:
| [in] | this | Full string |
| [in] | splitter | String to split on |
| [in] | compress | Compress (default = false) |
No 0-length substrings will be returned (adjacent tokens will be merged; tokens at the beginning and end of the original string will be ignored)
|
private |
Splits a string on a substring.
See string_split_char for description and example
| [in] | this | Full string |
| [in] | splitter | String to split on |
| [in] | compress | Compress (default = false) |
No 0-length substrings will be returned (adjacent tokens will be merged; tokens at the beginning and end of the original string will be ignored)
|
private |
Assigns a string from a character array.
| [out] | to | String to assign |
| [in] | from | New string value |
|
private |
Assigns a string from a double precision real number.
| [out] | to | String to assign |
| [in] | from | New string value |
|
private |
Assigns a string from an integer.
| [out] | to | String to assign |
| [in] | from | New string value |
|
private |
Assigns a string from a logical.
| [out] | to | String to assign |
| [in] | from | New string value |
|
private |
Assigns a string from a real number.
| [out] | to | String to assign |
| [in] | from | New string value |
|
private |
Compares a string to a character array for equality.
| [in] | a | String a |
| [in] | b | Character array b |
|
private |
Compares a string to a double-precision real number for equality.
| [in] | a | String a |
| [in] | b | Double-precition real number b |
|
private |
Compares a string to a integer for equality.
| [in] | a | String a |
| [in] | b | Integer b |
|
private |
Compares a string to a logical for equality.
| [in] | a | String a |
| [in] | b | Logical b |
|
private |
Compares a string to a real number for equality.
| [in] | a | String a |
| [in] | b | Real number b |
|
private |
Compares a string to a string for equality.
| [in] | a | String a |
| [in] | b | String b |
|
private |
Joins a string to a character array.
| [in] | a | String to join |
| [in] | b | Character array to join |
|
private |
Joins a string to a double precision real number.
| [in] | a | String to join |
| [in] | b | Double precision real number to join |
|
private |
Joins a string to an integer.
| [in] | a | String to join |
| [in] | b | Integer to join |
|
private |
Joins a string to a logical.
| [in] | a | String to join |
| [in] | b | Logical to join |
|
private |
Joins a string to a real number.
| [in] | a | String to join |
| [in] | b | Real number to join |
|
private |
Joins a string to a string.
| [in] | a | String to join |
| [in] | b | String to join |
|
private |
Compares a string to a character array for equality.
| [in] | a | String a |
| [in] | b | Character array b |
|
private |
Compares a string to a double-precision real number for equality.
| [in] | a | String a |
| [in] | b | Double-precition real number b |
|
private |
Compares a string to a integer for equality.
| [in] | a | String a |
| [in] | b | Integer b |
|
private |
Compares a string to a logical for equality.
| [in] | a | String a |
| [in] | b | Logical b |
|
private |
Compares a string to a real number for equality.
| [in] | a | String a |
| [in] | b | Real number b |
|
private |
Compares a string to a string for equality.
| [in] | a | String a |
| [in] | b | String b |
|
private |
Converts a string to a character array.
| [in] | this | String to convert |
|
private |
Returns a substring.
Example:
Output:
| [in] | this | Full string |
| [in] | start_index | Starting character index |
| [in] | length | Length of the substring to return |
Converts a string to lower case.
Adapted from http://www.star.le.ac.uk/~cgp/fortran.html (25 May 2012) Original author: Clive Page
| [in] | this | String to convert |
Converts a string to upper case.
Adapted from http://www.star.le.ac.uk/~cgp/fortran.html (25 May 2012) Original author: Clive Page
| [in] | this | String to convert |