本文整理汇总了C++中ustring::end方法的典型用法代码示例。如果您正苦于以下问题:C++ ustring::end方法的具体用法?C++ ustring::end怎么用?C++ ustring::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ustring
的用法示例。
在下文中一共展示了ustring::end方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ustr_to_vec
void printing_device::ustr_to_vec(ustring& str, vector<gunichar>& vec)
{
vec.clear();
ustring::iterator iter;
for (iter = str.begin(); iter != str.end(); ++iter)
{
vec.push_back(*iter);
}
}
示例2: isDigit
bool isDigit(const ustring& str)
{
ustring::const_iterator i;
for (i = str.begin(); i != str.end(); ++i)
if (isdigit(*i) == 0)
return false;
return true;
}
示例3: backslashes_to_forwardslashes
ustring directories::backslashes_to_forwardslashes(const ustring &tofix)
{
ustring retval;
ustring::const_iterator it;
for (it = tofix.begin(); it < tofix.end(); it++) {
if (*it == '\\') { retval.push_back('/'); }
else { retval.push_back(*it); }
}
return retval;
}
示例4: fix_slashes
// Change forward slash to backslash on WIN32, else there are major
// problems with system calls to the file system (unix_rmdir, for instance).
ustring directories::fix_slashes(const ustring &tofix)
{
ustring retval;
#ifdef WIN32
ustring::const_iterator it;
for (it = tofix.begin(); it < tofix.end(); it++) {
if (*it == '/') { retval.push_back('\\'); }
else { retval.push_back(*it); }
}
#else
retval = tofix;
#endif
return retval;
}
示例5:
void CGlobalRecords::wide2str16(const ustring& str1, u16string& str2)
{
ustring::const_iterator cBegin, cEnd;
size_t len;
str2.clear();
len = str1.length();
str2.reserve(len);
cBegin = str1.begin();
cEnd = str1.end();
while(cBegin != cEnd) {
str2.push_back((unsigned16_t)*cBegin++);
}
XL_ASSERT(str2.length() == str1.length());
}
示例6: ascii_toupper
inline ustring ascii_toupper(ustring str)
{
ustring ret;
for (ustring::const_iterator it = str.begin();
it != str.end();
++it)
{
uchar x = *it;
if (x >= 0x61 && x <= 0x7A)
x -= 0x20;
ret.append(x);
}
return ret;
}
示例7: hiragana
// vim: ts=4 sw=4 expandtab:
// Tue Mar 21 19:14:17 EST 2006
//--------------------------------------------------------------------------//
#include <string>
#include <glibmm.h>
using namespace Glib;
typedef std::wstring py_ustring;
//---------------------------------------------------------------------------//
const ustring hiragana("ぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただち>ぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをんゔゕゖ");
const py_ustring py_hiragana(hiragana.begin(), hiragana.end());
const ustring katakana("ァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチ>ヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶ");
//---------------------------------------------------------------------------//
const int _interKanaDistance = katakana[0] - hiragana[0];
const wchar_t _hiraganaStarts = 12353; // ぁ character
const wchar_t _hiraganaEnds = 12438; // hiragana ヶ character
const wchar_t _katakanaStarts = 12449; // ァ character
const wchar_t _katakanaEnds = 12534; // ヶ character
const wchar_t _kanjiStarts = 19968; // 一 character
const wchar_t _kanjiEnds = 40869; // 龥 character
//---------------------------------------------------------------------------//