summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2020-09-22 17:41:09 -0700
committerGitHub <noreply@github.com>2020-09-22 19:41:09 -0500
commit115511f6c5732cac1c3718d365d1cf5596541c95 (patch)
tree5510c2e9874c8241ade6218e09e5223f29282031 /src/util
parentbb0190a3d272e8d3207cfc358f79c647ed67acaf (diff)
[Python API] Conversion to/from Unicode strings (#5120)
Fixes #5024. This commit adds a conversion from constant string terms to native Python Unicode strings in Term.toPythonObj() and improves Solver.mkString() to accept strings containing characters outside of the printable range.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/string.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/string.cpp b/src/util/string.cpp
index af16e6a62..0d40ebb05 100644
--- a/src/util/string.cpp
+++ b/src/util/string.cpp
@@ -274,9 +274,9 @@ std::size_t String::roverlap(const String &y) const {
std::string String::toString(bool useEscSequences) const {
std::stringstream str;
for (unsigned int i = 0; i < size(); ++i) {
- // we always print forward slash as a code point so that it cannot
- // be interpreted as specifying part of a code point, e.g. the string
- // '\' + 'u' + '0' of length three.
+ // we always print backslash as a code point so that it cannot be
+ // interpreted as specifying part of a code point, e.g. the string '\' +
+ // 'u' + '0' of length three.
if (isPrintable(d_str[i]) && d_str[i] != '\\' && !useEscSequences)
{
str << static_cast<char>(d_str[i]);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback