StringiFor, Strings Fortran, yet another stringify Fortran module
Builtin adjustl overloading.
Left adjust a string by removing leading spaces (character output).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(string), | intent(in) | :: | self | The string. |
Adjusted string.
Builtin adjustr overloading.
Right adjust a string by removing leading spaces (character output).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(string), | intent(in) | :: | self | The string. |
Adjusted string.
Builtin count overloading.
Count the number of occurences of a substring into a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | string_ | String. |
||
| character(len=*), | intent(in) | :: | substring | Substring. |
Number of occurrences.
Builtin index overloading.
Return the position of the start of the first occurrence of string substring as a substring in string, counting from one.
If substring is not present in string, zero is returned. If the back argument is present and true, the return value is
the start of the last occurrence rather than the first.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(string), | intent(in) | :: | self | The string. |
||
| type(string), | intent(in) | :: | substring | Searched substring. |
||
| logical, | intent(in), | optional | :: | back | Start of the last occurrence rather than the first. |
Result of the search.
Return the position of the start of the first occurrence of string substring as a substring in string, counting from one.
If substring is not present in string, zero is returned. If the back argument is present and true, the return value is
the start of the last occurrence rather than the first.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(string), | intent(in) | :: | self | The string. |
||
| character(kind=CK,len=*), | intent(in) | :: | substring | Searched substring. |
||
| logical, | intent(in), | optional | :: | back | Start of the last occurrence rather than the first. |
Result of the search.
Return the position of the start of the first occurrence of string substring as a substring in string, counting from one.
If substring is not present in string, zero is returned. If the back argument is present and true, the return value is
the start of the last occurrence rather than the first.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(kind=CK,len=*), | intent(in) | :: | string_ | The string. |
||
| type(string), | intent(in) | :: | substring | Searched substring. |
||
| logical, | intent(in), | optional | :: | back | Start of the last occurrence rather than the first. |
Result of the search.
Builtin len overloading.
Builtin len_trim overloading.
Builtin repeat overloading.
Concatenates several copies of an input string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(string), | intent(in) | :: | self | String to be repeated. |
||
| integer, | intent(in) | :: | ncopies | Number of string copies. |
Repeated string.
Builtin scan overloading.
Return the leftmost (if back is either absent or equals false, otherwise the rightmost) character of string that is in set.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(string), | intent(in) | :: | self | The string. |
||
| type(string), | intent(in) | :: | set | Searched set. |
||
| logical, | intent(in), | optional | :: | back | Start of the last occurrence rather than the first. |
Result of the search.
Return the leftmost (if back is either absent or equals false, otherwise the rightmost) character of string that is in set.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(string), | intent(in) | :: | self | The string. |
||
| character(kind=CK,len=*), | intent(in) | :: | set | Searched set. |
||
| logical, | intent(in), | optional | :: | back | Start of the last occurrence rather than the first. |
Result of the search.
Return the leftmost (if back is either absent or equals false, otherwise the rightmost) character of string that is in set.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(kind=CK,len=*), | intent(in) | :: | sstring | The string. |
||
| type(string), | intent(in) | :: | set | Searched set. |
||
| logical, | intent(in), | optional | :: | back | Start of the last occurrence rather than the first. |
Result of the search.
Count the number of occurences of a substring into a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | string_ | String. |
||
| character(len=*), | intent(in) | :: | substring | Substring. |
Number of occurrences.
Read a file as a single string stream.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | file | File name. |
||
| type(string), | intent(out), | allocatable | :: | lines(:) | The lines. |
|
| character(len=*), | intent(in), | optional | :: | form | Format of unit. |
|
| integer, | intent(out), | optional | :: | iostat | IO status code. |
|
| character(len=*), | intent(inout), | optional | :: | iomsg | IO status message. |
Read lines (records) from a connected-formatted unit.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | unit | Logical unit. |
||
| type(string), | intent(out), | allocatable | :: | lines(:) | The lines. |
|
| character(len=*), | intent(in), | optional | :: | form | Format of unit. |
|
| integer, | intent(out), | optional | :: | iostat | IO status code. |
|
| character(len=*), | intent(inout), | optional | :: | iomsg | IO status message. |
Write lines (records) to a connected-formatted unit.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | unit | Logical unit. |
||
| type(string), | intent(in) | :: | lines(1:) | The lines. |
||
| character(len=*), | intent(in), | optional | :: | form | Format of unit. |
|
| integer, | intent(out), | optional | :: | iostat | IO status code. |
|
| character(len=*), | intent(inout), | optional | :: | iomsg | IO status message. |
Write a single string stream into file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | file | File name. |
||
| type(string), | intent(in) | :: | lines(1:) | The lines. |
||
| character(len=*), | intent(in), | optional | :: | form | Format of unit. |
|
| integer, | intent(out), | optional | :: | iostat | IO status code. |
|
| character(len=*), | intent(inout), | optional | :: | iomsg | IO status message. |