• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
        • Defun
        • Declare
        • System-utilities
        • Stobj
        • State
        • Mutual-recursion
        • Memoize
        • Mbe
        • Io
        • Defpkg
        • Apply$
        • Loop$
        • Programming-with-state
        • Arrays
        • Characters
        • Time$
        • Defmacro
        • Loop$-primer
        • Fast-alists
        • Defconst
        • Evaluation
        • Guard
        • Equality-variants
        • Compilation
        • Hons
        • ACL2-built-ins
        • Developers-guide
        • System-attachments
        • Advanced-features
        • Set-check-invariant-risk
        • Numbers
        • Efficiency
        • Irrelevant-formals
        • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
        • Redefining-programs
        • Lists
        • Invariant-risk
        • Errors
        • Defabbrev
        • Conses
        • Alists
        • Set-register-invariant-risk
        • Strings
          • Std/strings
          • String-listp
          • Stringp
          • Length
          • Search
          • Remove-duplicates
          • Position
          • Coerce
          • Concatenate
          • Reverse
          • String
          • Subseq
          • Substitute
          • String-upcase
          • String-downcase
          • Count
          • Char
          • String<
          • String-equal
          • String-utilities
          • String-append
          • String>=
          • String<=
          • String>
          • Hex-digit-char-theorems
          • String-downcase-gen
          • String-upcase-gen
        • Program-wrapper
        • Get-internal-time
        • Basics
        • Packages
        • Oracle-eval
        • Defmacro-untouchable
        • <<
        • Primitive
        • Revert-world
        • Unmemoize
        • Set-duplicate-keys-action
        • Symbols
        • Def-list-constructor
        • Easy-simplify-term
        • Defiteration
        • Fake-oracle-eval
        • Defopen
        • Sleep
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Interfacing-tools
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Programming

Strings

Strings are atomic objects that contain character sequences, like "Hello World".

See the std/strings library for many additional string functions and lemmas about the built-in string functions.

Subtopics

Std/strings
A library with many useful functions for working with strings, and for reasoning about ACL2's built-in string operations and these new operations.
String-listp
Recognizer for a true list of strings
Stringp
Recognizer for strings
Length
Length of a string or proper list
Search
Search for a string or list in another string or list
Remove-duplicates
Remove duplicates from a string or a list
Position
Position of an item in a string or a list
Coerce
Coerce a character list to a string and a string to a list
Concatenate
Concatenate lists or strings together
Reverse
Reverse a list or string
String
coerce to a string
Subseq
Subsequence of a string or list
Substitute
Substitute into a string or a list, using eql as test
String-upcase
In a given string, turn lower-case characters into upper-case
String-downcase
In a given string, turn upper-case characters into lower-case
Count
Count the number of occurrences of an item in a string or true-list
Char
The nth element (zero-based) of a string
String<
Less-than test for strings
String-equal
String equality without regard to case
String-utilities
Some utilities for strings (and characters).
String-append
concatenate two strings
String>=
Less-than-or-equal test for strings
String<=
Less-than-or-equal test for strings
String>
Greater-than test for strings
Hex-digit-char-theorems
Some theorems about the library functions str::hex-digit-char-value and str::hex-digit-to-char.
String-downcase-gen
Downcase any string (even ones with non-standard characters).
String-upcase-gen
Upcase any string (even ones with non-standard characters).