String utility routines.
Alias for procedure.
Converts given string to lower case.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout) | :: | str |
Input/output string. |
Alias for procedure.
Converts given string to upper case.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout) | :: | str |
Input/output string. |
Alias for procedure.
Returns given string in lower case.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
String to convert. |
Result.
Alias for procedure.
Returns given string in upper case.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
String to convert. |
Result.
Generic number to string converter.
Returns string representation of given 4-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i4), | intent(in) | :: | i |
Input. |
||
character(len=:), | intent(out), | allocatable | :: | str |
Output. |
|
integer, | intent(out), | optional | :: | error |
Error code. |
Returns string representation of given 8-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i8), | intent(in) | :: | i |
Input. |
||
character(len=:), | intent(out), | allocatable | :: | str |
Output. |
|
integer, | intent(out), | optional | :: | error |
Error code. |
Returns string representation of given 4-byte real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r4), | intent(in) | :: | f |
Input. |
||
character(len=:), | intent(out), | allocatable | :: | str |
Output. |
|
integer, | intent(out), | optional | :: | error |
Error code. |
Returns string representation of given 8-byte real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | f |
Input. |
||
character(len=:), | intent(out), | allocatable | :: | str |
Output. |
|
integer, | intent(out), | optional | :: | error |
Error code. |
Generic string to number converter.
Converts string to 4-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
Input. |
||
integer(kind=i4), | intent(out) | :: | i |
Output. |
||
integer, | intent(out), | optional | :: | error |
Error code. |
Converts string to 8-byte integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
Input. |
||
integer(kind=i8), | intent(out) | :: | i |
Output. |
||
integer, | intent(out), | optional | :: | error |
Error code. |
Converts string to 4-byte real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
Input. |
||
real(kind=r4), | intent(out) | :: | f |
Output. |
||
integer, | intent(out), | optional | :: | error |
Error code. |
Converts string to 8-byte real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
Input. |
||
real(kind=r8), | intent(out) | :: | f |
Output. |
||
integer, | intent(out), | optional | :: | error |
Error code. |
Derived type of allocatable character to be stored in an array.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | public, | allocatable | :: | data |
Counts occurences of character a
in str
, with optional quoting
(a
in between quote characters is not counted).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
Input. |
||
character(len=1), | intent(in) | :: | a |
Character to count. |
||
character(len=1), | intent(in), | optional | :: | quote |
Quote character. |
Returns the number of line breaks in string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout) | :: | str |
Input string. |
Returns the number of occurences of string s2
in string s1
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | s1 |
Input string. |
||
character(len=*), | intent(in) | :: | s2 |
Sub-string. |
Returns .true.
if given allocatable string is not passed, not
allocated, or contains only white spaces.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=:), | intent(inout), | optional, | allocatable | :: | str |
Input string. |
Returns .true.
if given string is present and not empty.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in), | optional | :: | str |
Input string. |
Returns .true.
if all characters is given string are printable
ASCII characters.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
String to validate. |
Returns given string in lower case.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
String to convert. |
Result.
Returns given string in upper case.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
String to convert. |
Result.
Returns .true.
if string a
starts with string b
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | a |
First string. |
||
character(len=*), | intent(in) | :: | b |
Second string. |
Allocates string type to empty character of length 0 or n
, if not
allocated already.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(string_type), | intent(inout) | :: | string |
String type. |
||
integer, | intent(in), | optional | :: | n |
Length of string data. |
Deallocates allocatable character inside of string type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(string_type), | intent(inout) | :: | string |
String type. |
Converts given string to lower case.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout) | :: | str |
Input/output string. |
Replaces character a
in str
with b
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout) | :: | str |
String to parse. |
||
character(len=1), | intent(in) | :: | a |
Character to replace. |
||
character(len=1), | intent(in) | :: | b |
Substitute character. |
Splits a string by a given delimiter into an array of strings.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str | |||
character(len=*), | intent(inout) | :: | array(:) | |||
character(len=*), | intent(in) | :: | del | |||
integer, | intent(out), | optional | :: | n |
Converts given string to upper case.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout) | :: | str |
Input/output string. |