handleRadix

Checks whether the radix in str (if present) matches the allow_radix flag, and passes the radix-stripped string to the provided delegate.

package
bool
handleRadix
(
cstring str
,,
scope bool delegate
(
cstring
)
process
)

Parameters

str cstring

string to convert

allow_radix bool

if true, the radix specified "0x" is allowed at the start of str

process bool delegate
(
cstring
)

process to perform on string if radix is as expected

Return Value

Type: bool

if str starts with "0x" and allow_radix is false, returns false otherwise, passes on the return value of the process delegate

Meta