OOP designed string class.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(kind=CK,len=:), | private, | allocatable | :: | raw | Raw data. |
Adjustl replacement.
Adjustr replacement.
Count replacement.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(len=*), | intent(in) | :: | substring | Substring. |
||
logical, | intent(in), | optional | :: | ignore_isolated | Ignore "isolated" occurrences. |
Number of occurrences.
Count the number of occurences of a substring into a string.
Index replacement.
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.
Len replacement.
Len_trim replacement.
Repeat replacement.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | String to be repeated. |
||
integer, | intent(in) | :: | ncopies | Number of string copies. |
Repeated string.
Concatenates several copies of an input string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | String to be repeated. |
||
character(kind=CK,len=*), | intent(in) | :: | rstring | String to be repeated. |
||
integer, | intent(in) | :: | ncopies | Number of string copies. |
Repeated string.
Concatenates several copies of an input string.
Scan replacement.
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
.
Trim replacement.
Verify replacement.
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 not
in set
. If all characters of string
are found in set
, the result is zero.
Return the base directory name of a string containing a file name.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | sep | Directory separator. |
Base directory name.
Return the base directory name of a string containing a file name.
Return the base file name of a string containing a file name.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | sep | Directory separator. |
|
character(kind=CK,len=*), | intent(in), | optional | :: | extension | File extension. |
|
logical, | intent(in), | optional | :: | strip_last_extension | Flag to enable the stripping of last extension. |
Base file name.
Return the base file name of a string containing a file name.
Return a string with all words capitalized without spaces.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | sep | Separator. |
Camel case string.
Return a string with all words capitalized without spaces.
Return a string with its first character capitalized and the rest lowercased.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
Upper case string.
Return a string with its first character capitalized and the rest lowercased.
Return the raw characters data.
Decode string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in) | :: | codec | Encoding codec. |
Decoded string.
Return a string decoded accordingly the codec.
Encode string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in) | :: | codec | Encoding codec. |
Encoded string.
Return a string encoded accordingly the codec.
Escape backslashes (or custom escape character).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=1), | intent(in) | :: | to_escape | Character to be escaped. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | esc | Character used to escape. |
Escaped string.
Escape backslashes (or custom escape character).
Return the extension of a string containing a file name.
Pad string on the left (or right) with zeros (or other char) to fill width.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
integer, | intent(in) | :: | width | Final width of filled string. |
||
logical, | intent(in), | optional | :: | right | Fill on the right instead of left. |
|
character(kind=CK,len=1), | intent(in), | optional | :: | filling_char | Filling character (default "0"). |
Filled string.
Pad string on the left (or right) with zeros (or other char) to fill width.
Free dynamic memory.
Insert substring into string at a specified position.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
type(string), | intent(in) | :: | substring | Substring. |
||
integer, | intent(in) | :: | pos | Position from which insert substring. |
Inserted string.
Insert substring into string at a specified position.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(len=*), | intent(in) | :: | substring | Substring. |
||
integer, | intent(in) | :: | pos | Position from which insert substring. |
Inserted string.
Insert substring into string at a specified position.
Return a string that is a join of an array of strings or characters.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
type(string), | intent(in) | :: | array(1:) | Array to be joined. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | sep | Separator. |
The join of array.
Return a string that is a join of an array of strings.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in) | :: | array(1:) | Array to be joined. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | sep | Separator. |
The join of array.
Return a string that is a join of an array of characters.
Return a string with all lowercase characters.
Split string at separator and return the 3 parts (before, the separator and after).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | sep | Separator. |
after the separator.
Split string at separator and return the 3 parts (before, the separator and after).
Read a file a single string stream.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | self | The string. |
||
character(len=*), | intent(in) | :: | file | File name. |
||
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 a file as a single string stream.
Read line (record) from a connected unit.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | self | The string. |
||
integer, | intent(in) | :: | unit | Logical unit. |
||
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 line (record) from a connected unit.
Read (all) lines (records) from a connected unit as a single ascii stream.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | self | The string. |
||
integer, | intent(in) | :: | unit | Logical unit. |
||
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 (all) lines (records) from a connected unit as a single ascii stream.
Return a string with all occurrences of substring old replaced by new.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in) | :: | old | Old substring. |
||
character(kind=CK,len=*), | intent(in) | :: | new | New substring. |
||
integer, | intent(in), | optional | :: | count | Number of old occurences to be replaced. |
The string with old replaced by new.
Return a string with all occurrences of substring old replaced by new.
Return a reversed string.
Search for tagged record into string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in) | :: | tag_start | Start tag. |
||
character(kind=CK,len=*), | intent(in) | :: | tag_end | End tag. |
||
type(string), | intent(in), | optional | :: | in_string | Search into this string. |
|
character(kind=CK,len=*), | intent(in), | optional | :: | in_character | Search into this character string. |
|
integer, | intent(out), | optional | :: | istart | Starting index of tag inside the string. |
|
integer, | intent(out), | optional | :: | iend | Ending index of tag inside the string. |
First tag found.
Search for tagged record into string, return the first record found (if any) matching the tags.
Return the raw characters data sliced.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
integer, | intent(in) | :: | istart | Slice start index. |
||
integer, | intent(in) | :: | iend | Slice end index. |
Raw characters data.
Return the raw characters data sliced.
Return a string with all words lowercase separated by "_".
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | sep | Separator. |
Snake case string.
Return a string with all words lowercase separated by "_".
Return a list of substring in the string, using sep as the delimiter string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
type(string), | intent(out), | allocatable | :: | tokens(:) | Tokens substring. |
|
character(kind=CK,len=*), | intent(in), | optional | :: | sep | Separator. |
Return a list of substring in the string, using sep as the delimiter string.
Return a string with all words capitalized, e.g. title case.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | sep | Separator. |
Start case string.
Return a string with all words capitalized, e.g. title case.
Return a string with the leading and trailing characters removed.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
logical, | intent(in), | optional | :: | remove_nulls | Remove null characters at the end. |
The stripped string.
Return a copy of the string with the leading and trailing characters removed.
Return a string with uppercase chars converted to lowercase and vice versa.
Cast string to number.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
integer(kind=I1P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to integer (I1P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
integer(kind=I2P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to integer (I2P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
integer(kind=I4P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to integer (I4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
integer(kind=I8P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to integer (I8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
real(kind=R4P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to real (R4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
real(kind=R8P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to real (R8P).
Unescape double backslashes (or custom escaped character).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=1), | intent(in) | :: | to_unescape | Character to be unescaped. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | unesc | Character used to unescape. |
Escaped string.
Unescape double backslashes (or custom escaped character).
Reduce to one (unique) multiple occurrences of a substring into a string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | substring | Substring which multiple occurences must be reduced to one. |
String parsed.
Reduce to one (unique) multiple (sequential) occurrences of a substring into a string.
Return a string with all uppercase characters.
Write a single string stream into file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(len=*), | intent(in) | :: | file | File name. |
||
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.
Write line (record) to a connected unit.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
integer, | intent(in) | :: | unit | Logical unit. |
||
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 line (record) to a connected unit.
Write lines (records) to a connected unit.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
integer, | intent(in) | :: | unit | Logical unit. |
||
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 unit.
Return true if a string ends with a specified suffix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in) | :: | suffix | Searched suffix. |
||
integer, | intent(in), | optional | :: | start | Start position into the string. |
|
integer, | intent(in), | optional | :: | end | End position into the string. |
Result of the test.
Return true if a string ends with a specified suffix.
Return true if the string is allocated.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
Result of the test.
Return true if the string is allocated.
Return true if all characters in the string are digits.
Return true if the string contains an integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
logical, | intent(in), | optional | :: | allow_spaces | Allow leading-trailing spaces. |
Result of the test.
Return true if the string contains an integer.
Return true if all characters in the string are lowercase.
Return true if the string contains a number (real or integer).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
logical, | intent(in), | optional | :: | allow_spaces | Allow leading-trailing spaces. |
Result of the test.
Return true if the string contains a number (real or integer).
Return true if the string contains an real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
logical, | intent(in), | optional | :: | allow_spaces | Allow leading-trailing spaces. |
Result of the test.
Return true if the string contains a real.
Return true if all characters in the string are uppercase.
Return true if a string starts with a specified prefix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in) | :: | prefix | Searched prefix. |
||
integer, | intent(in), | optional | :: | start | Start position into the string. |
|
integer, | intent(in), | optional | :: | end | End position into the string. |
Result of the test.
Return true if a string starts with a specified prefix.
Assignment operator overloading.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from string input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from character input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
integer(kind=I1P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
integer(kind=I2P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
integer(kind=I4P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
integer(kind=I8P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
real(kind=R4P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
real(kind=R8P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Concatenation operator overloading.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with character.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with character (inverted).
Concatenation operator (string output) overloading.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with character.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with character (inverted).
Equal operator overloading.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Equal to string logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Equal to character logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Equal to character (inverted) logical operator.
Not equal operator overloading.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Not equal to string logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Not equal to character logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Not equal to character (inverted) logical operator.
Lower than operator overloading.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Lower than to string logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Lower than to character logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Lower than to character (inverted) logical operator.
Lower equal than operator overloading.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Lower equal than to string logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Lower equal than to character logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Lower equal than to character (inverted) logical operator.
Greater equal than operator overloading.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Greater equal than to string logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Greater equal than to character logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Greater equal than to character (inverted) logical operator.
Greater than operator overloading.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Greater than to string logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Greater than to character logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Greater than to character (inverted) logical operator.
Index replacement.
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.
Index replacement.
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.
Repeat replacement.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | String to be repeated. |
||
integer, | intent(in) | :: | ncopies | Number of string copies. |
Repeated string.
Concatenates several copies of an input string.
Repeat replacement.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | String to be repeated. |
||
character(kind=CK,len=*), | intent(in) | :: | rstring | String to be repeated. |
||
integer, | intent(in) | :: | ncopies | Number of string copies. |
Repeated string.
Concatenates several copies of an input string.
Scan replacement.
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
.
Scan replacement.
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
.
Insert substring into string at a specified position.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
type(string), | intent(in) | :: | substring | Substring. |
||
integer, | intent(in) | :: | pos | Position from which insert substring. |
Inserted string.
Insert substring into string at a specified position.
Insert substring into string at a specified position.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(len=*), | intent(in) | :: | substring | Substring. |
||
integer, | intent(in) | :: | pos | Position from which insert substring. |
Inserted string.
Insert substring into string at a specified position.
Return join string of an array of strings.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
type(string), | intent(in) | :: | array(1:) | Array to be joined. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | sep | Separator. |
The join of array.
Return a string that is a join of an array of strings.
Return join string of an array of characters.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in) | :: | array(1:) | Array to be joined. |
||
character(kind=CK,len=*), | intent(in), | optional | :: | sep | Separator. |
The join of array.
Return a string that is a join of an array of characters.
Cast string to integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
integer(kind=I1P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to integer (I1P).
Cast string to integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
integer(kind=I2P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to integer (I2P).
Cast string to integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
integer(kind=I4P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to integer (I4P).
Cast string to integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
integer(kind=I8P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to integer (I8P).
Cast string to real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
real(kind=R4P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to real (R4P).
Cast string to real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
real(kind=R8P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to real (R8P).
Cast string to real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
real(kind=R16P), | intent(in) | :: | kind | Mold parameter for kind detection. |
The number into the string.
Cast string to real (R16P).
Assignment operator from string input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from string input.
Assignment operator from character input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from character input.
Assignment operator from integer input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
integer(kind=I1P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Assignment operator from integer input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
integer(kind=I2P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Assignment operator from integer input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
integer(kind=I4P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Assignment operator from integer input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
integer(kind=I8P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Assignment operator from real input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
real(kind=R4P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Assignment operator from real input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
real(kind=R8P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Assignment operator from real input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | lhs | Left hand side. |
||
real(kind=R16P), | intent(in) | :: | rhs | Right hand side. |
Assignment operator from real input.
Concatenation with string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with string.
Concatenation with character.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with character.
Concatenation with character (inverted).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with character (inverted).
Concatenation with string (string output).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with string.
Concatenation with character (string output).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with character.
Concatenation with character (inverted, string output).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Concatenated string.
Concatenation with character (inverted).
Equal to string logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Equal to string logical operator.
Equal to character logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Equal to character logical operator.
Equal to character (inverted) logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Equal to character (inverted) logical operator.
Not equal to string logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Not equal to string logical operator.
Not equal to character logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Not equal to character logical operator.
Not equal to character (inverted) logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Not equal to character (inverted) logical operator.
Lower than to string logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Lower than to string logical operator.
Lower than to character logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Lower than to character logical operator.
Lower than to character (inverted) logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Lower than to character (inverted) logical operator.
Lower equal than to string logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Lower equal than to string logical operator.
Lower equal than to character logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Lower equal than to character logical operator.
Lower equal than to character (inverted) logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Lower equal than to character (inverted) logical operator.
Greater equal than to string logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Greater equal than to string logical operator.
Greater equal than to character logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Greater equal than to character logical operator.
Greater equal than to character (inverted) logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Greater equal than to character (inverted) logical operator.
Greater than to string logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
type(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Greater than to string logical operator.
Greater than to character logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | lhs | Left hand side. |
||
character(kind=CK,len=*), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Greater than to character logical operator.
Greater than to character (inverted) logical operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | lhs | Left hand side. |
||
class(string), | intent(in) | :: | rhs | Right hand side. |
Opreator test result.
Greater than to character (inverted) logical operator.
Formatted input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | dtv | The string. |
||
integer, | intent(in) | :: | unit | Logical unit. |
||
character(len=*), | intent(in) | :: | iotype | Edit descriptor. |
||
integer, | intent(in) | :: | v_list(:) | Edit descriptor list. |
||
integer, | intent(out) | :: | iostat | IO status code. |
||
character(len=*), | intent(inout) | :: | iomsg | IO status message. |
Formatted input.
Read a delimited input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(out) | :: | dtv | The string. |
||
integer, | intent(in) | :: | unit | Logical unit. |
||
character(kind=CK,len=1), | intent(in) | :: | delim | String delimiter. |
||
integer, | intent(out) | :: | iostat | IO status code. |
||
character(kind=CK,len=*), | intent(inout) | :: | iomsg | IO status message. |
Read a delimited string from a unit connected for formatted input.
Read an undelimited input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | dtv | The string. |
||
integer, | intent(in) | :: | unit | Logical unit. |
||
character(kind=CK,len=*), | intent(in) | :: | terminators | Characters that are considered to terminate the string. Blanks in this string are meaningful. |
||
integer, | intent(out) | :: | iostat | IO status code. |
||
character(len=*), | intent(inout) | :: | iomsg | IO status message. |
Read an undelimited string up until end of record or a character from a set of terminators is encountered.
Read an undelimited list directed input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | dtv | The string. |
||
integer, | intent(in) | :: | unit | Logical unit. |
||
integer, | intent(out) | :: | iostat | IO status code. |
||
character(len=*), | intent(inout) | :: | iomsg | IO status message. |
Read an undelimited (no leading apostrophe or double quote) character value according to the rules for list directed input.
Formatted output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | dtv | The string. |
||
integer, | intent(in) | :: | unit | Logical unit. |
||
character(kind=CK,len=*), | intent(in) | :: | iotype | Edit descriptor. |
||
integer, | intent(in) | :: | v_list(:) | Edit descriptor list. |
||
integer, | intent(out) | :: | iostat | IO status code. |
||
character(kind=CK,len=*), | intent(inout) | :: | iomsg | IO status message. |
Formatted output.
Unformatted input.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(inout) | :: | dtv | The string. |
||
integer, | intent(in) | :: | unit | Logical unit. |
||
integer, | intent(out) | :: | iostat | IO status code. |
||
character(kind=CK,len=*), | intent(inout) | :: | iomsg | IO status message. |
Unformatted input.
Unformatted output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | dtv | The string. |
||
integer, | intent(in) | :: | unit | Logical unit. |
||
integer, | intent(out) | :: | iostat | IO status code. |
||
character(kind=CK,len=*), | intent(inout) | :: | iomsg | IO status message. |
Unformatted output.
Replace the first occurrence of substring old by new.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
||
character(kind=CK,len=*), | intent(in) | :: | old | Old substring. |
||
character(kind=CK,len=*), | intent(in) | :: | new | New substring. |
The string with old replaced by new.
Return a string with the first occurrence of substring old replaced by new.
type :: string
!< OOP designed string class.
private
character(kind=CK, len=:), allocatable :: raw !< Raw data.
contains
! public methods
! builtins replacements
procedure, pass(self) :: adjustl => sadjustl !< Adjustl replacement.
procedure, pass(self) :: adjustr => sadjustr !< Adjustr replacement.
procedure, pass(self) :: count => scount !< Count replacement.
generic :: index => sindex_string_string, &
sindex_string_character !< Index replacement.
procedure, pass(self) :: len => slen !< Len replacement.
procedure, pass(self) :: len_trim => slen_trim !< Len_trim replacement.
generic :: repeat => srepeat_string_string, &
srepeat_character_string !< Repeat replacement.
generic :: scan => sscan_string_string, &
sscan_string_character !< Scan replacement.
procedure, pass(self) :: trim => strim !< Trim replacement.
procedure, pass(self) :: verify => sverify !< Verify replacement.
! auxiliary methods
procedure, pass(self) :: basedir !< Return the base directory name of a string containing a file name.
procedure, pass(self) :: basename !< Return the base file name of a string containing a file name.
procedure, pass(self) :: camelcase !< Return a string with all words capitalized without spaces.
procedure, pass(self) :: capitalize !< Return a string with its first character capitalized and the rest lowercased.
procedure, pass(self) :: chars !< Return the raw characters data.
procedure, pass(self) :: decode !< Decode string.
procedure, pass(self) :: encode !< Encode string.
procedure, pass(self) :: escape !< Escape backslashes (or custom escape character).
procedure, pass(self) :: extension !< Return the extension of a string containing a file name.
procedure, pass(self) :: fill !< Pad string on the left (or right) with zeros (or other char) to fill width.
procedure, pass(self) :: free !< Free dynamic memory.
generic :: insert => &
insert_string, &
insert_character !< Insert substring into string at a specified position.
generic :: join => &
join_strings, &
join_characters !< Return a string that is a join of an array of strings or characters.
procedure, pass(self) :: lower !< Return a string with all lowercase characters.
procedure, pass(self) :: partition !< Split string at separator and return the 3 parts (before, the separator and after).
procedure, pass(self) :: read_file !< Read a file a single string stream.
procedure, pass(self) :: read_line !< Read line (record) from a connected unit.
procedure, pass(self) :: read_lines !< Read (all) lines (records) from a connected unit as a single ascii stream.
procedure, pass(self) :: replace !< Return a string with all occurrences of substring old replaced by new.
procedure, pass(self) :: reverse !< Return a reversed string.
procedure, pass(self) :: search !< Search for *tagged* record into string.
procedure, pass(self) :: slice !< Return the raw characters data sliced.
procedure, pass(self) :: snakecase !< Return a string with all words lowercase separated by "_".
procedure, pass(self) :: split !< Return a list of substring in the string, using sep as the delimiter string.
procedure, pass(self) :: startcase !< Return a string with all words capitalized, e.g. title case.
procedure, pass(self) :: strip !< Return a string with the leading and trailing characters removed.
procedure, pass(self) :: swapcase !< Return a string with uppercase chars converted to lowercase and vice versa.
generic :: to_number => &
to_integer_I1P,&
to_integer_I2P,&
to_integer_I4P,&
to_integer_I8P,&
to_real_R4P, &
#ifdef r16p
to_real_R8P, &
to_real_R16P !< Cast string to number.
#else
to_real_R8P !< Cast string to number.
#endif
procedure, pass(self) :: unescape !< Unescape double backslashes (or custom escaped character).
procedure, pass(self) :: unique !< Reduce to one (unique) multiple occurrences of a substring into a string.
procedure, pass(self) :: upper !< Return a string with all uppercase characters.
procedure, pass(self) :: write_file !< Write a single string stream into file.
procedure, pass(self) :: write_line !< Write line (record) to a connected unit.
procedure, pass(self) :: write_lines !< Write lines (records) to a connected unit.
! inquire methods
procedure, pass(self) :: end_with !< Return true if a string ends with a specified suffix.
procedure, pass(self) :: is_allocated !< Return true if the string is allocated.
procedure, pass(self) :: is_digit !< Return true if all characters in the string are digits.
procedure, pass(self) :: is_integer !< Return true if the string contains an integer.
procedure, pass(self) :: is_lower !< Return true if all characters in the string are lowercase.
procedure, pass(self) :: is_number !< Return true if the string contains a number (real or integer).
procedure, pass(self) :: is_real !< Return true if the string contains an real.
procedure, pass(self) :: is_upper !< Return true if all characters in the string are uppercase.
procedure, pass(self) :: start_with !< Return true if a string starts with a specified prefix.
! operators
generic :: assignment(=) => string_assign_string, &
string_assign_character, &
string_assign_integer_I1P, &
string_assign_integer_I2P, &
string_assign_integer_I4P, &
string_assign_integer_I8P, &
string_assign_real_R4P, &
#ifdef r16p
string_assign_real_R8P, &
string_assign_real_R16P !< Assignment operator overloading.
#else
string_assign_real_R8P !< Assignment operator overloading.
#endif
generic :: operator(//) => string_concat_string, &
string_concat_character, &
character_concat_string !< Concatenation operator overloading.
generic :: operator(.cat.) => string_concat_string_string, &
string_concat_character_string, &
character_concat_string_string !< Concatenation operator (string output) overloading.
generic :: operator(==) => string_eq_string, &
string_eq_character, &
character_eq_string !< Equal operator overloading.
generic :: operator(/=) => string_ne_string, &
string_ne_character, &
character_ne_string !< Not equal operator overloading.
generic :: operator(<) => string_lt_string, &
string_lt_character, &
character_lt_string !< Lower than operator overloading.
generic :: operator(<=) => string_le_string, &
string_le_character, &
character_le_string !< Lower equal than operator overloading.
generic :: operator(>=) => string_ge_string, &
string_ge_character, &
character_ge_string !< Greater equal than operator overloading.
generic :: operator(>) => string_gt_string, &
string_gt_character, &
character_gt_string !< Greater than operator overloading.
! IO
#ifndef __GFORTRAN__
generic :: read(formatted) => read_formatted !< Formatted input.
generic :: write(formatted) => write_formatted !< Formatted output.
generic :: read(unformatted) => read_unformatted !< Unformatted input.
generic :: write(unformatted) => write_unformatted !< Unformatted output.
#endif
! private methods
! builtins replacements
procedure, private, pass(self) :: sindex_string_string !< Index replacement.
procedure, private, pass(self) :: sindex_string_character !< Index replacement.
procedure, private, pass(self) :: srepeat_string_string !< Repeat replacement.
procedure, private, pass(self) :: srepeat_character_string !< Repeat replacement.
procedure, private, pass(self) :: sscan_string_string !< Scan replacement.
procedure, private, pass(self) :: sscan_string_character !< Scan replacement.
! auxiliary methods
procedure, private, pass(self) :: insert_string !< Insert substring into string at a specified position.
procedure, private, pass(self) :: insert_character !< Insert substring into string at a specified position.
procedure, private, pass(self) :: join_strings !< Return join string of an array of strings.
procedure, private, pass(self) :: join_characters !< Return join string of an array of characters.
procedure, private, pass(self) :: to_integer_I1P !< Cast string to integer.
procedure, private, pass(self) :: to_integer_I2P !< Cast string to integer.
procedure, private, pass(self) :: to_integer_I4P !< Cast string to integer.
procedure, private, pass(self) :: to_integer_I8P !< Cast string to integer.
procedure, private, pass(self) :: to_real_R4P !< Cast string to real.
procedure, private, pass(self) :: to_real_R8P !< Cast string to real.
procedure, private, pass(self) :: to_real_R16P !< Cast string to real.
! assignments
procedure, private, pass(lhs) :: string_assign_string !< Assignment operator from string input.
procedure, private, pass(lhs) :: string_assign_character !< Assignment operator from character input.
procedure, private, pass(lhs) :: string_assign_integer_I1P !< Assignment operator from integer input.
procedure, private, pass(lhs) :: string_assign_integer_I2P !< Assignment operator from integer input.
procedure, private, pass(lhs) :: string_assign_integer_I4P !< Assignment operator from integer input.
procedure, private, pass(lhs) :: string_assign_integer_I8P !< Assignment operator from integer input.
procedure, private, pass(lhs) :: string_assign_real_R4P !< Assignment operator from real input.
procedure, private, pass(lhs) :: string_assign_real_R8P !< Assignment operator from real input.
procedure, private, pass(lhs) :: string_assign_real_R16P !< Assignment operator from real input.
! concatenation operators
procedure, private, pass(lhs) :: string_concat_string !< Concatenation with string.
procedure, private, pass(lhs) :: string_concat_character !< Concatenation with character.
procedure, private, pass(rhs) :: character_concat_string !< Concatenation with character (inverted).
procedure, private, pass(lhs) :: string_concat_string_string !< Concatenation with string (string output).
procedure, private, pass(lhs) :: string_concat_character_string !< Concatenation with character (string output).
procedure, private, pass(rhs) :: character_concat_string_string !< Concatenation with character (inverted, string output).
! logical operators
procedure, private, pass(lhs) :: string_eq_string !< Equal to string logical operator.
procedure, private, pass(lhs) :: string_eq_character !< Equal to character logical operator.
procedure, private, pass(rhs) :: character_eq_string !< Equal to character (inverted) logical operator.
procedure, private, pass(lhs) :: string_ne_string !< Not equal to string logical operator.
procedure, private, pass(lhs) :: string_ne_character !< Not equal to character logical operator.
procedure, private, pass(rhs) :: character_ne_string !< Not equal to character (inverted) logical operator.
procedure, private, pass(lhs) :: string_lt_string !< Lower than to string logical operator.
procedure, private, pass(lhs) :: string_lt_character !< Lower than to character logical operator.
procedure, private, pass(rhs) :: character_lt_string !< Lower than to character (inverted) logical operator.
procedure, private, pass(lhs) :: string_le_string !< Lower equal than to string logical operator.
procedure, private, pass(lhs) :: string_le_character !< Lower equal than to character logical operator.
procedure, private, pass(rhs) :: character_le_string !< Lower equal than to character (inverted) logical operator.
procedure, private, pass(lhs) :: string_ge_string !< Greater equal than to string logical operator.
procedure, private, pass(lhs) :: string_ge_character !< Greater equal than to character logical operator.
procedure, private, pass(rhs) :: character_ge_string !< Greater equal than to character (inverted) logical operator.
procedure, private, pass(lhs) :: string_gt_string !< Greater than to string logical operator.
procedure, private, pass(lhs) :: string_gt_character !< Greater than to character logical operator.
procedure, private, pass(rhs) :: character_gt_string !< Greater than to character (inverted) logical operator.
! IO
procedure, private, pass(dtv) :: read_formatted !< Formatted input.
procedure, private, pass(dtv) :: read_delimited !< Read a delimited input.
procedure, private, pass(dtv) :: read_undelimited !< Read an undelimited input.
procedure, private, pass(dtv) :: read_undelimited_listdirected !< Read an undelimited list directed input.
procedure, private, pass(dtv) :: write_formatted !< Formatted output.
procedure, private, pass(dtv) :: read_unformatted !< Unformatted input.
procedure, private, pass(dtv) :: write_unformatted !< Unformatted output.
! miscellanea
procedure, private, pass(self) :: replace_one_occurrence !< Replace the first occurrence of substring old by new.
endtype string