本文整理汇总了C++中ustring::lowercase方法的典型用法代码示例。如果您正苦于以下问题:C++ ustring::lowercase方法的具体用法?C++ ustring::lowercase怎么用?C++ ustring::lowercase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ustring
的用法示例。
在下文中一共展示了ustring::lowercase方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
_size_t_ getVowelPos (ustring ch) {
_size_t_ pos = VowelsWithAccents.find (ch.lowercase ());
if (pos != ustring::npos)
pos /= NUMBER_OF_ACCENTS;
else if (Vowels.find (ch.lowercase ()) != pos)
pos = Vowels.find (ch.lowercase ());
return pos;
}
示例2: getMarkedCharPos
_size_t_ getMarkedCharPos (ustring ch) {
_size_t_ mark =
LettersWithMarks.find (removeAccentFromChar (ch.lowercase ()));
if (mark != ustring::npos)
mark %= LettersWithoutMarks.length ();
return mark;
}
示例3: getAccentFromChar
Accents getAccentFromChar (ustring ch) {
_size_t_ accent = VowelsWithAccents.find (ch.lowercase ());
if (accent != ustring::npos)
accent %= NUMBER_OF_ACCENTS;
else
accent = NO_ACCENT;
return accent;
}
示例4: removeAccentFromChar
ustring removeAccentFromChar (ustring ch) {
bool isUp = isUpperCase (ch);
ch = ch.lowercase ();
_size_t_ posVowel = getVowelPos (ch);
if (posVowel != ustring::npos)
ch = _(Vowels[posVowel]);
if (isUp)
ch = ch.uppercase ();
return ch;
}
示例5: addAccentToChar
ustring addAccentToChar (ustring ch, Accents accent) {
bool isUp = isUpperCase (ch);
ch = ch.lowercase ();
_size_t_ pos = Vowels.find (ch);
if (pos != ustring::npos)
ch = _(VowelsWithAccents[pos * NUMBER_OF_ACCENTS + accent]);
if (isUp)
ch = ch.uppercase ();
return ch;
}
示例6: operator
bool operator() (const ustring& str1, const ustring& str2) const {
if (str1.length() >= str2.length() && str2.lowercase() == str1.substr(0, str2.length()).lowercase())
return false;
else
return true;
}
示例7: isWordBreak
bool isWordBreak (ustring ch, guint BackspaceChar) {
// A char is a word-break if and only if tt's a non-letter
// character and not a Backspace.
return !isLetter (ch.lowercase ()) && ch != _(BackspaceChar);
}
示例8: isVowel
bool isVowel (ustring ch) {
return PlainVowels.find (toPlainLetter (ch.lowercase ()))
!= ustring::npos;
}