Adjusts the string to the left by removing any leading blanks and pushing any removed blanks onto the end of the string.
Adjusts the string to the left by removing any leading blanks and pushing any removed blanks onto the end of the string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | x |
The string to adjust. |
The adjusted string.
Adjusts the string to the right by removing any trailing blanks and pushing any removed blanks onto the front of the string.
Adjusts the string to the right by removing any trailing blanks and pushing any removed blanks onto the front of the string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | x |
The string to adjust. |
The adjusted string.
Copies a string to a traditional Fortran character(len = *) string or vice-versa.
Assigns a string to a character array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(out) | :: | lhs |
The string to which lhs is assigned. |
||
| type(string), | intent(in) | :: | rhs |
The string to copy. |
Assigns a character array to a string type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(out) | :: | lhs |
The string object to which rhs is assigned. |
||
| character(len=*), | intent(in) | :: | rhs |
The string to copy. |
Converts a string to a Fortran character array.
Converts a string to a Fortran character array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | x |
The string to convert. |
The resulting string.
Finds the starting index of all substrings within a parent string.
Finds the starting index of all substrings within a parent string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
The string to search. |
||
| character(len=*), | intent(in) | :: | substr |
The substring to search for. |
An array containing the starting index of each occurrence of substr in str.
Finds the starting index of all substrings within a parent string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
The string to search. |
||
| type(string), | intent(in) | :: | substr |
The substring to search for. |
An array containing the starting index of each occurrence of substr in str.
Finds the starting index of all substrings within a parent string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | str |
The string to search. |
||
| character(len=*), | intent(in) | :: | substr |
The substring to search for. |
An array containing the starting index of each occurrence of substr in str.
Finds the starting index of all substrings within a parent string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | str |
The string to search. |
||
| type(string), | intent(in) | :: | substr |
The substring to search for. |
An array containing the starting index of each occurrence of substr in str.
Returns the starting position of a substring within a string.
Returns the starting position of a substring within a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | str |
The string to search. |
||
| type(string), | intent(in) | :: | substr |
The substring for which to search. |
||
| logical, | intent(in), | optional | :: | back |
occurrence rather than the first; else, if true, the index is the start of the first occurrence of the substring. |
The starting index of the substring.
Returns the starting position of a substring within a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | str |
The string to search. |
||
| character(len=*), | intent(in) | :: | substr |
The substring for which to search. |
||
| logical, | intent(in), | optional | :: | back |
occurrence rather than the first; else, if true, the index is the start of the first occurrence of the substring. |
The starting index of the substring.
Returns the starting position of a substring within a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
The string to search. |
||
| type(string), | intent(in) | :: | substr |
The substring for which to search. |
||
| logical, | intent(in), | optional | :: | back |
occurrence rather than the first; else, if true, the index is the start of the first occurrence of the substring. |
The starting index of the substring.
Inserts a substring into another string at the specified index.
Inserts a substring into another string at the specified index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
The string into which the substring will be inserted. |
||
| integer(kind=int32), | intent(in) | :: | start |
The starting index at which to insert the substring. |
||
| character(len=*), | intent(in) | :: | substr |
The substring to insert. |
The resulting string.
Inserts a substring into another string at the specified index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
The string into which the substring will be inserted. |
||
| integer(kind=int32), | intent(in) | :: | start |
The starting index at which to insert the substring. |
||
| type(string), | intent(in) | :: | substr |
The substring to insert. |
The resulting string.
Inserts a substring into another string at the specified index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | str |
The string into which the substring will be inserted. |
||
| integer(kind=int32), | intent(in) | :: | start |
The starting index at which to insert the substring. |
||
| character(len=*), | intent(in) | :: | substr |
The substring to insert. |
The resulting string.
Inserts a substring into another string at the specified index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | str |
The string into which the substring will be inserted. |
||
| integer(kind=int32), | intent(in) | :: | start |
The starting index at which to insert the substring. |
||
| type(string), | intent(in) | :: | substr |
The substring to insert. |
The resulting string.
Returns the length of a string.
Returns the length of a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | x |
The string to interrogate. |
The length of the string.
Returns the length of a string.
Returns the length of a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | x |
The string to interrogate. |
The length of the string.
Concatenation of two strings.
Concatenates two strings.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | lhs |
The left-hand-side string. |
||
| type(string), | intent(in) | :: | rhs |
The right-hand-side string. |
The resulting string.
Concatenates two strings.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | lhs |
The left-hand-side string. |
||
| type(string), | intent(in) | :: | rhs |
The right-hand-side string. |
The resulting string.
Concatenates two strings.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | lhs |
The left-hand-side string. |
||
| character(len=*), | intent(in) | :: | rhs |
The right-hand-side string. |
The resulting string.
Element-wise comparison of two strings.
Tests two strings for inequality.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | lhs |
The left-hand-side argument. |
||
| type(string), | intent(in) | :: | rhs |
The right-hand-side argument. |
True if the strings are not equal; else, false.
Tests two strings for inequality.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | lhs |
The left-hand-side argument. |
||
| type(string), | intent(in) | :: | rhs |
The right-hand-side argument. |
True if the strings are not equal; else, false.
Tests two strings for inequality.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | lhs |
The left-hand-side argument. |
||
| character(len=*), | intent(in) | :: | rhs |
The right-hand-side argument. |
True if the strings are not equal; else, false.
Element-wise comparison of two strings.
Tests two strings for equality.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | lhs |
The left-hand-side argument. |
||
| type(string), | intent(in) | :: | rhs |
The right-hand-side argument. |
True if the strings are equal; else, false.
Tests two strings for equality.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | lhs |
The left-hand-side argument. |
||
| type(string), | intent(in) | :: | rhs |
The right-hand-side argument. |
True if the strings are equal; else, false.
Tests two strings for equality.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | lhs |
The left-hand-side argument. |
||
| character(len=*), | intent(in) | :: | rhs |
The right-hand-side argument. |
True if the strings are equal; else, false.
Removes a range of characters from the string.
Removes a range of characters from the string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
The string on which to operate. |
||
| integer(kind=int32), | intent(in), | optional | :: | start |
OPTIONAL: The starting index. The default is 1. |
|
| integer(kind=int32), | intent(in), | optional | :: | finish |
OPTIONAL: The finishing index. The default is len(str) |
The resulting string.
Removes a range of characters from the string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | str |
The string on which to operate. |
||
| integer(kind=int32), | intent(in), | optional | :: | start |
OPTIONAL: The starting index. The default is 1. |
|
| integer(kind=int32), | intent(in), | optional | :: | finish |
OPTIONAL: The finishing index. The default is len(str) |
The resulting string.
Removes the first occurrence of the specified substring from the string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
The string from which to remove the substring. |
||
| character(len=*), | intent(in) | :: | substr |
The substring to remove. |
The resulting string.
Removes the first occurrence of the specified substring from the string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
The string from which to remove the substring. |
||
| type(string), | intent(in) | :: | substr |
The substring to remove. |
The resulting string.
Removes the first occurrence of the specified substring from the string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | str |
The string from which to remove the substring. |
||
| character(len=*), | intent(in) | :: | substr |
The substring to remove. |
The resulting string.
Removes the first occurrence of the specified substring from the string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | str |
The string from which to remove the substring. |
||
| type(string), | intent(in) | :: | substr |
The substring to remove. |
The resulting string.
Replaces the substring identified by the supplied regular expression pattern with a new substring.
Replaces all instances of a substring within a parent string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | src |
The string on which to operate. |
||
| character(len=*), | intent(in) | :: | old |
The string to replace. |
||
| character(len=*), | intent(in) | :: | substr |
The new substring. |
The resulting string.
Replaces all instances of a substring within a parent string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | src |
The string on which to operate. |
||
| character(len=*), | intent(in) | :: | old |
The string to replace. |
||
| type(string), | intent(in) | :: | substr |
The new substring. |
The resulting string.
Replaces all instances of a substring within a parent string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | src |
The string on which to operate. |
||
| type(string), | intent(in) | :: | old |
The string to replace. |
||
| character(len=*), | intent(in) | :: | substr |
The new substring. |
The resulting string.
Replaces all instances of a substring within a parent string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | src |
The string on which to operate. |
||
| type(string), | intent(in) | :: | old |
The string to replace. |
||
| type(string), | intent(in) | :: | substr |
The new substring. |
The resulting string.
Replaces all instances of a substring within a parent string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | src |
The string on which to operate. |
||
| character(len=*), | intent(in) | :: | old |
The string to replace. |
||
| character(len=*), | intent(in) | :: | substr |
The new substring. |
The resulting string.
Replaces all instances of a substring within a parent string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | src |
The string on which to operate. |
||
| character(len=*), | intent(in) | :: | old |
The string to replace. |
||
| type(string), | intent(in) | :: | substr |
The new substring. |
The resulting string.
Replaces all instances of a substring within a parent string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | src |
The string on which to operate. |
||
| type(string), | intent(in) | :: | old |
The string to replace. |
||
| character(len=*), | intent(in) | :: | substr |
The new substring. |
The resulting string.
Replaces all instances of a substring within a parent string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | src |
The string on which to operate. |
||
| type(string), | intent(in) | :: | old |
The string to replace. |
||
| type(string), | intent(in) | :: | substr |
The new substring. |
The resulting string.
Scans the string for any of the characters in the specified substring.
Scans the string for any of the characters in the specified substring.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | str |
The string to search. |
||
| type(string), | intent(in) | :: | substr |
The string for which to search. |
||
| logical, | intent(in), | optional | :: | back |
leftmost character; else, if true, the rightmost position is returned. |
The index of either the leftmost or rightmost character.
Scans the string for any of the characters in the specified substring.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | str |
The string to search. |
||
| character(len=*), | intent(in) | :: | substr |
The string for which to search. |
||
| logical, | intent(in), | optional | :: | back |
leftmost character; else, if true, the rightmost position is returned. |
The index of either the leftmost or rightmost character.
Scans the string for any of the characters in the specified substring.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
The string to search. |
||
| type(string), | intent(in) | :: | substr |
The string for which to search. |
||
| logical, | intent(in), | optional | :: | back |
leftmost character; else, if true, the rightmost position is returned. |
The index of either the leftmost or rightmost character.
Splits a string by the specified delimiter character.
Splits a string by the supplied delimiter character.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | txt |
The string on which to operate. |
||
| character(len=1), | intent(in) | :: | delim |
The delimiter character. |
An array containing the resulting sub-strings.
Splits a string by the supplied delimiter character.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | txt |
The string on which to operate. |
||
| character(len=1), | intent(in) | :: | delim |
The delimiter character. |
An array containing the resulting sub-strings.
Converts a string to a 32-bit integer.
Converts a string to a 32-bit integer.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | x |
The string to convert. |
The resulting integer.
Converts a string to a 32-bit integer.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | x |
The string to convert. |
The resulting integer.
Converts a string to a 64-bit real.
Converts a string to a 64-bit real.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | x |
The string to convert. |
The resulting value.
Converts a string to a 64-bit real.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | x |
The string to convert. |
The resulting value.
Converts a Fortran string to a C-compatible, null-terminated string.
Converts a Fortran string to a C-compatible, null-terminated string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | x |
The string to convert. |
The resulting C string.
Converts a Fortran string to a C-compatible, null-terminated string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | x |
The string to convert. |
The resulting C string.
Converts a string to all lowercase characters. Any characters that are already lowercase, a special symbol, or a numeric value are not modified.
Converts a string to all lowercase characters. Any characters that are already lowercase, a special symbol, or a numeric value are not modified.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | x |
The string on which to operate. |
The resulting string.
Converts a string to all lowercase characters. Any characters that are already lowercase, a special symbol, or a numeric value are not modified.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | x |
The string on which to operate. |
The resulting string.
Converts an item to a string.
Converts a Fortran character array to a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | x |
The string to convert. |
The resulting string.
Converts an 8-bit integer to a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int8), | intent(in) | :: | x |
The value to convert. |
The resulting string.
Converts a 16-bit integer to a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int16), | intent(in) | :: | x |
The value to convert. |
The resulting string.
Converts a 32-bit integer to a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | x |
The value to convert. |
The resulting string.
Converts a 64-bit integer to a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | x |
The value to convert. |
The resulting string.
Converts a 32-bit real to a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in) | :: | x |
The value to convert. |
||
| character(len=*), | intent(in), | optional | :: | fmt |
is used. If used, specify as "(G13.6)", or whatever appropriate format string is desired. Regardless, be sure to include the parenthesis. |
The resulting string.
Converts a 64-bit real to a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | x |
The value to convert. |
||
| character(len=*), | intent(in), | optional | :: | fmt |
is used. If used, specify as "(G13.6)", or whatever appropriate format string is desired. Regardless, be sure to include the parenthesis. |
The resulting string.
Converts a 128-bit real to a string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real128), | intent(in) | :: | x |
The value to convert. |
||
| character(len=*), | intent(in), | optional | :: | fmt |
is used. If used, specify as "(G13.6)", or whatever appropriate format string is desired. Regardless, be sure to include the parenthesis. |
The resulting string.
Converts an array of C characters (C string) to a string. The C string must be null-terminated. The null-terimator character will not be included in the result.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(kind=c_char, len=1), | intent(in) | :: | str(*) |
The C-string to convert. |
||
| integer(kind=int32), | intent(in), | optional | :: | nchar |
conversion. The default is 2048. |
Converts a string to all uppercase characters. Any characters that are already uppercase, a special symbol, or a numeric value are not modified.
Converts a string to all uppercase characters. Any characters that are already uppercase, a special symbol, or a numeric value are not modified.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | x |
The string on which to operate. |
The resulting string.
Converts a string to all uppercase characters. Any characters that are already uppercase, a special symbol, or a numeric value are not modified.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string), | intent(in) | :: | x |
The string on which to operate. |
The resulting string.
Trims any trailing blanks from the end of the string.
Provides a mechanism for building strings without reallocation on each addition.
| generic, public :: append => sb_append_char, sb_append_string | |
| procedure , public :: initialize => sb_init Subroutine | |
| procedure , public :: length => sb_get_length Function | |
| procedure , public :: to_string => sb_to_string Function |