diff options
author | Vincent Richard <[email protected]> | 2010-05-21 07:41:15 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2010-05-21 07:41:15 +0000 |
commit | 4ff310c7e445c2b39d6ffda2b75a097d50fabaae (patch) | |
tree | 8a948b1267451abf0a525de0b3296670d67fa6a1 /src/utility/stringUtils.cpp | |
parent | Fixed missing #include. (diff) | |
download | vmime-4ff310c7e445c2b39d6ffda2b75a097d50fabaae.tar.gz vmime-4ff310c7e445c2b39d6ffda2b75a097d50fabaae.zip |
Always encode special charsets.
Diffstat (limited to 'src/utility/stringUtils.cpp')
-rw-r--r-- | src/utility/stringUtils.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/utility/stringUtils.cpp b/src/utility/stringUtils.cpp index abae8f9a..7f61a7d3 100644 --- a/src/utility/stringUtils.cpp +++ b/src/utility/stringUtils.cpp @@ -151,6 +151,24 @@ string::size_type stringUtils::countASCIIchars } +string::size_type stringUtils::findFirstNonASCIIchar + (const string::const_iterator begin, const string::const_iterator end) +{ + string::size_type pos = string::npos; + + for (string::const_iterator i = begin ; i != end ; ++i) + { + if (!parserHelpers::isAscii(*i)) + { + pos = i - begin; + break; + } + } + + return pos; +} + + const string stringUtils::unquote(const string& str) { if (str.length() < 2) |