This commit is contained in:
Jean-Francois Dockes 2020-08-28 09:24:04 +02:00
parent 2ab959de24
commit 92f636be39
3 changed files with 6 additions and 6 deletions

View File

@ -57,9 +57,9 @@ struct StringIcmpPred {
const std::string& m_s1;
};
extern int stringlowercmp(const std::string& s1,
extern int stringlowercmp(const std::string& s1, // already lower
const std::string& s2);
extern int stringuppercmp(const std::string& s1,
extern int stringuppercmp(const std::string& s1, // already upper
const std::string& s2);
extern void stringtolower(std::string& io);

View File

@ -22,8 +22,8 @@
using namespace std;
void utf8truncate(std::string& s, int maxlen, int flags, string ellipsis,
string ws)
void utf8truncate(std::string& s, int maxlen, int flags, const string& ellipsis,
const string& ws)
{
if (s.size() <= string::size_type(maxlen)) {
return;

View File

@ -283,8 +283,8 @@ private:
enum Utf8TruncateFlag {UTF8T_NONE, UTF8T_ATWORD, UTF8T_ELLIPSIS};
// maxlen is in utf-8 chars.
extern void utf8truncate(std::string& s, int maxlen, int flags = 0,
std::string ellipsis = "...",
std::string ws = " \t\n\r");
const std::string& ellipsis = "...",
const std::string& ws = " \t\n\r");
extern size_t utf8len(const std::string& s);
/** @brief Check and possibly fix string by replacing badly encoded