{
const std::vector<unsigned>& svec = s.getVec();
// can remove up to the first occurrence of a digit
- for (unsigned i = 0; i < svec.size(); i++)
+ unsigned svsize = svec.size();
+ for (unsigned i = 0; i < svsize; i++)
{
- unsigned sindex = r == 0 ? i : svec.size() - i;
+ unsigned sindex = r == 0 ? i : (svsize - 1) - i;
if (String::isDigit(svec[sindex]))
{
break;
regress0/strings/str005.smt2 \
regress0/strings/strings-charat.cvc \
regress0/strings/strings-native-simple.cvc \
+ regress0/strings/strip-endpoint-itos.smt2 \
regress0/strings/substr-rewrites.smt2 \
regress0/strings/type001.smt2 \
regress0/strings/unsound-0908.smt2 \
--- /dev/null
+(set-info :smt-lib-version 2.5)
+(set-logic QF_SLIA)
+(set-option :strings-exp true)
+(set-info :status sat)
+(declare-fun x () Int)
+(assert (str.contains "Ducati100" (int.to.str x)))
+(check-sat)