• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
          • Name-database
          • Vl-gc
          • Make-lookup-alist
          • Symbol-list-names
          • Html-encoding
          • Nats-from
          • Redundant-mergesort
          • Longest-common-prefix
          • Vl-edition-p
          • Nat-listp
          • Vl-plural-p
          • Vl-remove-keys
          • Sum-nats
          • Vl-maybe-nat-listp
          • Url-encoding
            • *vl-url-encode-array*
            • Vl-url-encode-chars-aux
            • Vl-url-encode-char
            • Vl-url-encode-chars
            • Vl-url-encode-string
              • Vl-url-encode-string-aux
              • Vl-fast-url-encode-char
            • Fast-memberp
            • Vl-string-keys-p
            • Max-nats
            • Longest-common-prefix-list
            • Character-list-listp
            • Vl-string-list-values-p
            • Vl-character-list-list-values-p
            • Remove-from-alist
            • Prefix-of-eachp
            • Vl-maybe-string-listp
            • Pos-listp
            • Vl-string-values-p
            • String-list-listp
            • True-list-listp
            • Symbol-list-listp
            • Explode-list
            • All-have-len
            • Min-nats
            • Debuggable-and
            • Vl-starname
            • Remove-equal-without-guard
            • String-fix
            • Longer-than-p
            • Clean-alist
            • Anyp
            • Or*
            • Fast-alist-free-each-alist-val
            • And*
            • Not*
            • Free-list-of-fast-alists
            • *nls*
          • Loader
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Url-encoding

    Vl-url-encode-string

    Simple way to URL encode a string.

    Signature
    (vl-url-encode-string x) → encoded
    Arguments
    x — Guard (stringp x).
    Returns
    encoded — Type (stringp encoded).

    Definitions and Theorems

    Function: vl-url-encode-string$inline

    (defun vl-url-encode-string$inline (x)
     (declare (type string x))
     (declare (xargs :guard (stringp x)))
     (declare (xargs :split-types t))
     (let ((__function__ 'vl-url-encode-string))
       (declare (ignorable __function__))
       (let ((x (mbe :logic (str-fix x) :exec x)))
         (str::rchars-to-string (vl-url-encode-string-aux x 0 (length x)
                                                          nil)))))

    Theorem: stringp-of-vl-url-encode-string

    (defthm stringp-of-vl-url-encode-string
      (b* ((encoded (vl-url-encode-string$inline x)))
        (stringp encoded))
      :rule-classes :type-prescription)

    Theorem: vl-url-encode-string$inline-of-str-fix-x

    (defthm vl-url-encode-string$inline-of-str-fix-x
      (equal (vl-url-encode-string$inline (str-fix x))
             (vl-url-encode-string$inline x)))

    Theorem: vl-url-encode-string$inline-streqv-congruence-on-x

    (defthm vl-url-encode-string$inline-streqv-congruence-on-x
      (implies (streqv x x-equiv)
               (equal (vl-url-encode-string$inline x)
                      (vl-url-encode-string$inline x-equiv)))
      :rule-classes :congruence)