shared
This commit is contained in:
parent
2ab959de24
commit
92f636be39
@ -57,9 +57,9 @@ struct StringIcmpPred {
|
|||||||
const std::string& m_s1;
|
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);
|
const std::string& s2);
|
||||||
extern int stringuppercmp(const std::string& s1,
|
extern int stringuppercmp(const std::string& s1, // already upper
|
||||||
const std::string& s2);
|
const std::string& s2);
|
||||||
|
|
||||||
extern void stringtolower(std::string& io);
|
extern void stringtolower(std::string& io);
|
||||||
|
|||||||
@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
void utf8truncate(std::string& s, int maxlen, int flags, string ellipsis,
|
void utf8truncate(std::string& s, int maxlen, int flags, const string& ellipsis,
|
||||||
string ws)
|
const string& ws)
|
||||||
{
|
{
|
||||||
if (s.size() <= string::size_type(maxlen)) {
|
if (s.size() <= string::size_type(maxlen)) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -283,8 +283,8 @@ private:
|
|||||||
enum Utf8TruncateFlag {UTF8T_NONE, UTF8T_ATWORD, UTF8T_ELLIPSIS};
|
enum Utf8TruncateFlag {UTF8T_NONE, UTF8T_ATWORD, UTF8T_ELLIPSIS};
|
||||||
// maxlen is in utf-8 chars.
|
// maxlen is in utf-8 chars.
|
||||||
extern void utf8truncate(std::string& s, int maxlen, int flags = 0,
|
extern void utf8truncate(std::string& s, int maxlen, int flags = 0,
|
||||||
std::string ellipsis = "...",
|
const std::string& ellipsis = "...",
|
||||||
std::string ws = " \t\n\r");
|
const std::string& ws = " \t\n\r");
|
||||||
extern size_t utf8len(const std::string& s);
|
extern size_t utf8len(const std::string& s);
|
||||||
|
|
||||||
/** @brief Check and possibly fix string by replacing badly encoded
|
/** @brief Check and possibly fix string by replacing badly encoded
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user