JSON-Fortran support module for string manipulation.
Convert a 'DEFAULT' kind character input to 'ISO_10646' kind and return it
Convert string to unicode (CDK to CK).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CDK,len=*), | intent(in) | :: | str |
Convert array of strings to unicode (CDK to CK).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CDK,len=*), | intent(in), | dimension(:) | :: | str |
Decode a string from the "JSON Pointer" RFC 6901 format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | str |
CDK
==CK
operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CDK,len=*), | intent(in) | :: | def_str | |||
character(kind=CK,len=*), | intent(in) | :: | ucs4_str |
CDK
//CK
operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CDK,len=*), | intent(in) | :: | def_str | |||
character(kind=CK,len=*), | intent(in) | :: | ucs4_str |
CDK
/=CK
operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CDK,len=*), | intent(in) | :: | def_str | |||
character(kind=CK,len=*), | intent(in) | :: | ucs4_str |
Encode a string into the "JSON Pointer" RFC 6901 format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | str |
Returns lowercase version of the CK
string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | str | input string |
lowercase version of the string
Convert string to unicode (CDK to CK).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CDK,len=*), | intent(in) | :: | str |
Convert array of strings to unicode (CDK to CK).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CDK,len=*), | intent(in), | dimension(:) | :: | str |
CK
==CDK
operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | ucs4_str | |||
character(kind=CDK,len=*), | intent(in) | :: | def_str |
CK
//CDK
operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | ucs4_str | |||
character(kind=CDK,len=*), | intent(in) | :: | def_str |
CK
/=CDK
operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | ucs4_str | |||
character(kind=CDK,len=*), | intent(in) | :: | def_str |
Returns true if the string is a valid 4-digit hex string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | str | the string to check. |
is str a value 4-digit hex string
Compact a string representing a real number, so that the same value is displayed with fewer characters.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(inout) | :: | str | string representation of a real number. |
Add the escape characters to a string for adding to JSON.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | str_in | |||
character(kind=CK,len=:), | intent(out), | allocatable | :: | str_out | ||
logical(kind=LK), | intent(in) | :: | escape_solidus | if the solidus (forward slash) is also to be escaped |
Convert an integer to a string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=IK), | intent(in) | :: | ival | integer value. |
||
character(kind=CDK,len=*), | intent(in) | :: | int_fmt | format for integers |
||
character(kind=CK,len=*), | intent(out) | :: | str |
|
Convert a real value to a string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=RK), | intent(in) | :: | rval | real value. |
||
character(kind=CDK,len=*), | intent(in) | :: | real_fmt | format for real numbers |
||
logical(kind=LK), | intent(in) | :: | compact_real | compact the string so that it is displayed with fewer characters |
||
character(kind=CK,len=*), | intent(out) | :: | str |
|
Replace all occurrences of s1
in str
with s2
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=:), | intent(inout), | allocatable | :: | str | ||
character(kind=CK,len=*), | intent(in) | :: | s1 | |||
character(kind=CK,len=*), | intent(in) | :: | s2 |
Convert a string into an integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | str | the string to convert to an integer |
||
integer(kind=IK), | intent(out) | :: | ival | the integer value |
||
logical(kind=LK), | intent(out) | :: | status_ok | true if there were no errors |
Convert a string into a real(RK)
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | str | the string to convert to a real |
||
real(kind=RK), | intent(out) | :: | rval |
|
||
logical(kind=LK), | intent(out) | :: | status_ok | true if there were no errors |
Remove the escape characters from a JSON string and return it.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=CK,len=*), | intent(in) | :: | str_in | string as stored in a json_value |
||
character(kind=CK,len=:), | intent(out), | allocatable | :: | str_out | decoded string |
|
character(kind=CK,len=:), | intent(out), | allocatable | :: | error_message | will be allocated if there was an error |