Read a TOML string value if present.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(toml_table), | intent(inout) | :: | table | |||
| character(len=*), | intent(in) | :: | key | |||
| character(len=:), | intent(inout), | allocatable | :: | v |
subroutine toml_get_string(table, key, v) type(toml_table), intent(inout) :: table character(len=*), intent(in) :: key character(len=:), allocatable, intent(inout) :: v character(len=:), allocatable :: tmp integer :: stat call get_value(table, key, tmp, stat=stat) if (stat == toml_stat%success) then if (allocated(tmp)) then v = tmp else v = "" end if end if end subroutine toml_get_string