• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
      • Std/lists
      • Omaps
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
        • Pretty-printing
        • Printtree
        • Base64
        • Charset-p
          • Defcharset
          • Count-leading-charset
          • Str-count-leading-charset-fast
          • Str-count-leading-charset
          • Chars-in-charset-p
          • Code-in-charset-p
            • Char-in-charset-p
          • Strtok!
          • Cases
          • Concatenation
          • Character-kinds
          • Html-encoding
          • Substrings
          • Strtok
          • Equivalences
          • Url-encoding
          • Lines
          • Explode-implode-equalities
          • Ordering
          • Numbers
          • Pad-trim
          • Coercion
          • Std/strings/digit-to-char
          • Substitution
          • Symbols
        • Std/osets
        • Std/io
        • Std/basic
        • Std/system
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Charset-p

    Code-in-charset-p

    (code-in-charset-p code set) determines if the character whose code is code is a member of the character set set.

    Signature
    (code-in-charset-p code set) → *
    Arguments
    set — Guard (charset-p set).

    Typically there's no reason to use this. But if you already have the character code available for some reason, this may be slightly more efficient than turning it back into a character and then calling char-in-charset-p.

    Definitions and Theorems

    Function: code-in-charset-p$inline

    (defun code-in-charset-p$inline (code set)
      (declare (type (unsigned-byte 8) code))
      (declare (xargs :guard (charset-p set)))
      (let ((acl2::__function__ 'code-in-charset-p))
        (declare (ignorable acl2::__function__))
        (mbe :logic (char-in-charset-p (code-char code) set)
             :exec (logbitp code set))))