ad_proc_valid_switch_p (private)

 ad_proc_valid_switch_p str

Defined in packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl

Check if the provided argument looks like a switch (i.e. it starts with a dash and is not a number).

Parameters:
str

Partial Call Graph (max 5 caller/called nodes):
%3 ad_proc ad_proc (public) ad_proc_valid_switch_p ad_proc_valid_switch_p ad_proc->ad_proc_valid_switch_p

Testcases:
No testcase defined.
Source code:
    #
    # Check if this looks like a switch:
    #   - first character is '-'
    #   - next character is not a Tcl number
    #   - next string is a printable character
    #
    return [expr {[string index $str 0] eq "-"
              && ![string is double -strict $str]
              && [regexp {^-[[:graph:]]+$} $str]
    }]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: