valid_json_hex Function

public pure function valid_json_hex(str) result(valid)

Arguments

Type IntentOptional AttributesName
character(kind=CK,len=*), intent(in) :: str

the string to check.

Return Value logical(kind=LK)

is str a value 4-digit hex string


Variables

TypeVisibility AttributesNameInitial
integer(kind=IK), public :: n

length of str

integer(kind=IK), public :: i

counter

character(kind=CK,len=1), public, parameter, dimension(22):: valid_chars =[(achar(i), i=48, 57), (achar(i), i=65, 70), (achar(i), i=97, 102)]

an array of the valid hex characters