Module for string manipulation.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=*), | private, | parameter | :: | lower | = | 'abcdefghijklmnopqrstuvwxyz' |
lowercase characters |
| character(len=*), | private, | parameter | :: | upper | = | 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
uppercase characters |
Replace all occurrences of a single character s1 in str with s2.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
original string |
||
| character(len=1), | intent(in) | :: | s1 |
find all occurrences of this character |
||
| character(len=1), | intent(in) | :: | s2 |
replace with this character |
new string
Chop leading chars string from str.
Note that trailing spaces are not ignored in either string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
original string |
||
| character(len=*), | intent(in) | :: | chars |
characters to strip |
new string
Chop trailing chars string from str.
Note that trailing spaces are not ignored in either string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
original string |
||
| character(len=*), | intent(in) | :: | chars |
characters to strip |
new string
Reverse a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
original string |
new string
Strip all occurances of chars from the beginning and end of the string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
original string |
||
| character(len=*), | intent(in), | optional | :: | chars |
characters to strip |
new string
Convert the string to uppercase.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(inout) | :: | str |
Convert the string to lowercase.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(inout) | :: | str |