Handling character types. More...
Data Types | |
| interface | concat |
| interface | cprintf |
| interface | cprintft |
| interface | get_array |
| interface | index_ofs |
| interface | lchar |
| interface | printf |
| interface | putline |
| interface | replace |
| interface | roundnum |
| interface | split |
| interface | stoa |
| interface | stod |
| interface | stoi |
| interface | str_to_logical |
| interface | strhead |
| interface | strieq |
| interface | strinclude |
| interface | tochar |
| interface | tolower |
| interface | toupper |
| interface | uchar |
Functions/Subroutines | |
| character(string) function, public | joinchar (carray, expr) |
| integer function, public | index_ofs (string, start, substr) |
| recursive character(string) function, public | replace (str, from, to, recursive, start_pos) |
| character(string) function, public | uchar (ch) |
| character(string) function, public | lchar (ch) |
| character(string) function, public | roundnum (num) |
Handling character types.
Important
This file is generated from ../../../../src/dc_utils/dc_string.erb by ERB included Ruby 3.3.8. Please do not edit this file directly.
| integer function, public dc_string::index_ofs | ( | character(len = *), intent(in) | string, |
| integer, intent(in) | start, | ||
| character(len = *), intent(in) | substr | ||
| ) |
Find substring position with offset
Returns the starting position where substr is found in string, searching from position start. Returns 0 if not found. The returned position is counted from the beginning of string.
| [in] | string | String to search in |
| [in] | start | Starting position for search |
| [in] | substr | Substring to find |
Definition at line 1611 of file dc_string.f90.
| character(string) function, public dc_string::joinchar | ( | character(*), dimension(:), intent(in) | carray, |
| character(*), intent(in), optional | expr | ||
| ) |
Join character array with delimiter
Joins elements of character array carray with ", " delimiter. If expr is given, uses that string as delimiter.
| [in] | carray | Character array to join |
| [in] | expr | Delimiter string (optional, default: ", ") |
Definition at line 1120 of file dc_string.f90.
| character(string) function, public dc_string::lchar | ( | character(len = *), intent(in) | ch | ) |
Return lowercase copy of string
Returns a copy of ch with all uppercase letters converted to lowercase. Non-alphabetic characters and already lowercase characters are unchanged.
| [in] | ch | String to convert |
Definition at line 1808 of file dc_string.f90.
| recursive character(string) function, public dc_string::replace | ( | character(*), intent(in) | str, |
| character(*), intent(in) | from, | ||
| character(*), intent(in) | to, | ||
| logical, intent(in), optional | recursive, | ||
| integer, intent(in), optional | start_pos | ||
| ) |
Replace substring in string
If string from is included in str, replaces it with string to and returns. If from is not included, returns str without change. When multiple from are included, only the first one is replaced. To replace all from to to, give .true. to optional argument recursive. By default, the string is searched from the top. If optional argument start_pos is given, the search starts from start_pos.
| [in] | str | Source string |
| [in] | from | String to find |
| [in] | to | Replacement string |
| [in] | recursive | If .true., replace all occurrences (optional) |
| [in] | start_pos | Starting position for search (optional) |
Definition at line 1658 of file dc_string.f90.
| character(string) function, public dc_string::roundnum | ( | character(*), intent(in) | num | ) |
Round numeric string representation
Formats numeric strings like '0.30000001' or '12.999998' that have rounding errors to cleaner representations like '0.3' or '13.'.
| [in] | num | Numeric string to round |
Definition at line 1831 of file dc_string.f90.
| character(string) function, public dc_string::uchar | ( | character(len = *), intent(in) | ch | ) |
Return uppercase copy of string
Returns a copy of ch with all lowercase letters converted to uppercase. Non-alphabetic characters and already uppercase characters are unchanged.
| [in] | ch | String to convert |
Definition at line 1785 of file dc_string.f90.