Open
Description
Currently most routines provided by stdlib_ascii
are only applicable to single characters. The conversion (to_lower
and to_upper
) routines were straight-forward to extend to character strings (see #310). For the logical functions it is a bit more complicated.
For each of the logical functions (is_ascii
, ...) two possible reductions apply: any
and all
. To follow the Fortran naming of the verify
and scan
intrinsic` one could implement three versions for each logical function:
- single character version:
is_ascii
- fixed length character version with any reduction:
verify_ascii
(empty string returns.false.
) - fixed length character version with all reduction:
scan_ascii
(empty string returns.true.
)
Alternatively, to be more in line with the verify
and scan
function, the index of the first matching character could be returned, which makes it easy to create the respective logical by a simple comparison.