Strings, typed #
The regular expression matching exactly the given string.
Equations
Instances For
Replaces every occurrence of a sub-string.
Equations
- s.strReplaceAll pat repl = Cvc.Untyped.Term.strReplaceAll s pat repl
Instances For
Whether the string is a single digit, "0" through "9".
Equations
Instances For
Index of the first match of re in s at or after start, or -1.
Equations
- s.strIndexofRe re start = Cvc.Untyped.Term.strIndexofRe s re start
Instances For
Replaces the first match of a regular expression.
Equations
- s.strReplaceRe re repl = Cvc.Untyped.Term.strReplaceRe s re repl
Instances For
Decimal representation of a non-negative integer, or the empty string otherwise.
Equations
- arg.strFromInt = Cvc.Untyped.Term.strFromInt arg
Instances For
Replaces every match of a regular expression.
Equations
- s.strReplaceReAll re repl = Cvc.Untyped.Term.strReplaceReAll s re repl
Instances For
Conversion to upper case.
Equations
Instances For
Conversion to lower case.
Equations
Instances For
A string literal; with useEscapes, SMT-LIB escapes such as \u{48} in s are decoded.
Equations
- Cvc.Typed.Term.mkString s useEscapes = Cvc.Untyped.Term.mkString s useEscapes
Instances For
The one-character string with the given code point, or the empty string if out of range.
Equations
- code.strFromCode = Cvc.Untyped.Term.strFromCode code
Instances For
strConcat over two or more terms.
Equations
- Cvc.Typed.Term.strConcatN terms atLeastTwoElements = Cvc.Untyped.Term.strConcatN terms atLeastTwoElements
Instances For
Replaces the first occurrence of a sub-string.
Equations
- s.strReplace pat repl = Cvc.Untyped.Term.strReplace s pat repl
Instances For
Index of the first occurrence of sub in s at or after start, or -1.
Equations
- s.strIndexof sub start = Cvc.Untyped.Term.strIndexof s sub start
Instances For
Takes a term apart one level, at its sort, if String owns its operator and the term's sort fits it.
Equations
- One or more equations did not get rendered due to their size.
Instances For
String's operators with a result of sort Bool.
- strContains
[Ω]
(s sub : Term String)
: OnBool
Whether
scontainssub. - strPrefix
[Ω]
(pre s : Term String)
: OnBool
Whether
preis a prefix ofs. - strSuffix
[Ω]
(suf s : Term String)
: OnBool
Whether
sufis a suffix ofs. - strIsDigit
[Ω]
(s : Term String)
: OnBool
Whether the string is a single digit,
"0"through"9". - strLt
[Ω]
(lft rgt : Term String)
: OnBool
Whether
lftcomes strictly beforergt, lexicographically over code points. - strLe
[Ω]
(lft rgt : Term String)
: OnBool
Whether
lftcomes beforergtor equals it, lexicographically over code points. - strInRegex
[Ω]
(s : Term String)
(re : Term Regex)
: OnBool
Whether
smatchesre.
Instances For
String's operators with a result of sort Int.
- strLength
[Ω]
(s : Term String)
: OnInt
Length.
- strIndexof
[Ω]
(s sub : Term String)
(start : Term Int)
: OnInt
Index of the first occurrence of
subinsat or afterstart, or-1. - strIndexofRe
[Ω]
(s : Term String)
(re : Term Regex)
(start : Term Int)
: OnInt
Index of the first match of
reinsat or afterstart, or-1. - strToCode
[Ω]
(s : Term String)
: OnInt
Code point of a one-character string, or
-1otherwise. - strToInt
[Ω]
(s : Term String)
: OnInt
Value of a string of digits, or
-1if it is not one.
Instances For
String's operators with a result of sort String.
- strConcat
[Ω]
(kids : Kids String)
: OnString
Concatenation.
kidsholds every operand, two or more. - strSubstr
[Ω]
(s : Term String)
(idx len : Term Int)
: OnString
The sub-string of length
lenstarting atidx; empty when out of range. - strCharAt
[Ω]
(s : Term String)
(idx : Term Int)
: OnString
The one-character string at an index, or the empty string if out of bounds.
- strReplace
[Ω]
(s pat repl : Term String)
: OnString
Replaces the first occurrence of a sub-string.
- strReplaceAll
[Ω]
(s pat repl : Term String)
: OnString
Replaces every occurrence of a sub-string.
- strReplaceRe
[Ω]
(s : Term String)
(re : Term Regex)
(repl : Term String)
: OnString
Replaces the first match of a regular expression.
- strReplaceReAll
[Ω]
(s : Term String)
(re : Term Regex)
(repl : Term String)
: OnString
Replaces every match of a regular expression.
- strRev
[Ω]
(s : Term String)
: OnString
Reversal.
- strUpdate
[Ω]
(s : Term String)
(idx : Term Int)
(repl : Term String)
: OnString
Overwrites
sfromidxwithrepl, keeping its length;sifidxis out of range. - strToLower
[Ω]
(s : Term String)
: OnString
Conversion to lower case.
- strToUpper
[Ω]
(s : Term String)
: OnString
Conversion to upper case.
- strFromCode
[Ω]
(code : Term Int)
: OnString
The one-character string with the given code point, or the empty string if out of range.
- strFromInt
[Ω]
(arg : Term Int)
: OnString
Decimal representation of a non-negative integer, or the empty string otherwise.
Instances For
String's operators, taken apart one level, indexed by the sort each produces.
- bool
[Ω]
: OnBool → View.String Typ.bool
An operator with a result of sort
Bool. - string
[Ω]
: OnString → View.String Typ.string
An operator with a result of sort
String. - int
[Ω]
: OnInt → View.String Typ.int
An operator with a result of sort
Int. - regex
[Ω]
: OnRegex → View.String Typ.regex
An operator with a result of sort
Regex.
Instances For
Values #
Whether a term is a string value.
Equations
- term.isStringValue = Cvc.Untyped.Term.isStringValue term
Instances For
The string a term denotes, failing if it denotes none.
Equations
- term.getStringValue = Cvc.Untyped.Term.getStringValue term
Instances For
The string a term denotes, failing if it denotes none.
Equations
- term.getStringValue? = Cvc.Untyped.Term.getStringValue? term
Instances For
The string term denoting s, whatever characters it holds.
Fails on a character beyond cvc5's alphabet, whose code points stop at 0x2FFFF.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.