shared
This commit is contained in:
parent
2ab959de24
commit
92f636be39
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user