Module provides string handling capabilities Replace a substring with another in a string
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(c_printOptions), | public | :: | printOptions |
Interface to print a string representation of a number The output format options can be set using the printOptions class
Interfaced with str()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r32), | intent(in) | :: | this | |||
character(len=*), | intent(in), | optional | :: | delim |
Interfaced with str()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r32), | intent(in) | :: | this(:) | |||
character(len=*), | intent(in), | optional | :: | delim |
Interfaced with str()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | this | |||
character(len=*), | intent(in), | optional | :: | delim |
Interfaced with str()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | this(:) | |||
character(len=*), | intent(in), | optional | :: | delim |
Interfaced with str()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | this(:,:) | |||
character(len=*), | intent(in), | optional | :: | delim |
Interfaced with str()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(in) | :: | this | |||
character(len=*), | intent(in), | optional | :: | delim |
Interfaced with str()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(in) | :: | this(:) | |||
character(len=*), | intent(in), | optional | :: | delim |
Interfaced with str()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i64), | intent(in) | :: | this | |||
character(len=*), | intent(in), | optional | :: | delim |
Interfaced with str()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i64), | intent(in) | :: | this(:) | 1D array |
||
character(len=*), | intent(in), | optional | :: | delim |
Interfaced with str()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | this | |||
character(len=*), | intent(in), | optional | :: | delim |
Interfaced with str()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | this(:) | |||
character(len=*), | intent(in), | optional | :: | delim |
Interfaced with str()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | this | |||
character(len=*), | intent(in), | optional | :: | delim |
Print options similar to numpy's print_options
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=i32), | public | :: | precision | = | 3 | Force this precision on the written number |
|
integer(kind=i32), | public | :: | threshold | = | 10 | Omit the middle entries if the size is greater than threshold |
|
integer(kind=i32), | public | :: | edgeitems | = | 3 | Only write the first and last threshold elements from rows and/or columns |
|
character(len=32), | public | :: | nanstr | = | 'nan' | Print NAN as this |
|
character(len=32), | public | :: | infstr | = | 'inf' | Print infinity as this |
Check that a string has N entries
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | this | ||||
integer(kind=i32) | :: | N |
Count the number of entries in a string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | this |
Convert a string to lowercase
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | str |
Convert a string to uppercase
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | str |
Match two string together
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | tmp1 | Compare this string |
|||
character(len=*) | :: | tmp2 | Compare this string |
|||
logical, | optional | :: | exact_ | Optional logical, if true, the strings are not converted to lowercase before comparison |
Append a string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | this | String to append to |
|||
character(len=*) | :: | that | String to append |
|||
character(len=*), | optional | :: | delim_ | Optional delimiter to separate the append |
Appended String
Prepend a string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | this | String to prepend to |
|||
character(len=*) | :: | that | String to prepend |
|||
character(len=*), | optional | :: | delim_ | Optional delimiter to separate the append |
Prepended String
Use iachar on a full string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | this |
Get a single integer from a line, returns an error code if there is more than one entry
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | buf | String |
|||
integer(kind=i32) | :: | N | Single integer |
|||
integer(kind=i32) | :: | istat | istat > 0 if more than one entry is found |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(in) | :: | iunit | |||
real(kind=r64) | :: | this | ||||
character(len=*) | :: | fname | ||||
character(len=*) | :: | vName | ||||
integer(kind=i32) | :: | istat |
Replace tabs and spaces with a single space str must be a variable and not an explicit 'string'. Otherwise adjustl will fail.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | this |
Replace a single character length delimiter in a string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | this | Replace delim_miter in this |
|||
character(len=*) | :: | dlim | Find this delim_miter |
|||
character(len=*) | :: | dlimr | Replace with this delim_miter |
Reads a line from a file, ignoring any comments
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32) | :: | iUnit | File ID number |
|||
character(len=*) | :: | line | Character string to read the line into |
|||
integer(kind=i32) | :: | istat | Error Status |
Removes the text after the ! mark in a string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout) | :: | this |