2021-01-31 20:53:53 +01:00
|
|
|
#include "util/ustring_clen.hpp"
|
|
|
|
|
2022-04-06 08:37:19 +02:00
|
|
|
int ustring_clen(const Glib::ustring &str) {
|
2021-01-31 20:53:53 +01:00
|
|
|
int total = 0;
|
|
|
|
for (auto i = str.begin(); i != str.end(); ++i) {
|
|
|
|
total += g_unichar_iswide(*i) + 1;
|
|
|
|
}
|
|
|
|
return total;
|
|
|
|
}
|