TOML の文字列キーを固定長文字列へ読み込む。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(toml_table), | intent(inout) | :: | table | |||
| type(toml_key), | intent(in) | :: | key | |||
| character(len=*), | intent(out) | :: | value | |||
| character(len=*), | intent(in) | :: | context |
subroutine get_toml_string(table, key, value, context) type(toml_table), intent(inout) :: table type(toml_key), intent(in) :: key character(len=*), intent(out) :: value character(len=*), intent(in) :: context character(len=:), allocatable :: tmp integer :: stat call get_value(table, key, tmp, stat=stat) call require_toml_success(stat, context) if (.not. allocated(tmp)) error stop 'Invalid TOML value for '//trim(context)//'.' value = '' value = trim(tmp) end subroutine get_toml_string