本文整理汇总了C++中string::MakeLower方法的典型用法代码示例。如果您正苦于以下问题:C++ string::MakeLower方法的具体用法?C++ string::MakeLower怎么用?C++ string::MakeLower使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类string
的用法示例。
在下文中一共展示了string::MakeLower方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: filterItems
/* BrowserCanvas::filterItems
* Filters the visible items by [filter], by name
*******************************************************************/
void BrowserCanvas::filterItems(string filter)
{
// Clear current filter list
items_filter.clear();
// If the filter is empty, just add all items to the filter
if (filter.IsEmpty())
{
for (unsigned a = 0; a < items.size(); a++)
items_filter.push_back(a);
}
else
{
// Setup filter string
filter.MakeLower();
filter += "*";
// Go through items
for (unsigned a = 0; a < items.size(); a++)
{
// Add to filter list if name matches
if (items[a]->getName().Lower().Matches(filter))
items_filter.push_back(a);
}
}
// Update scrollbar and refresh
updateScrollBar();
Refresh();
}
示例2: filterItems
/* BrowserCanvas::filterItems
* Filters the visible items by [filter], by name
*******************************************************************/
void BrowserCanvas::filterItems(string filter)
{
// Find the currently-viewed item before we change the item list
int viewed_index = getViewedIndex();
// Clear current filter list
items_filter.clear();
// If the filter is empty, just add all items to the filter
if (filter.IsEmpty())
{
for (unsigned a = 0; a < items.size(); a++)
items_filter.push_back(a);
}
else
{
// Setup filter string
filter.MakeLower();
filter += "*";
// Go through items
for (unsigned a = 0; a < items.size(); a++)
{
// Add to filter list if name matches
if (items[a]->getName().Lower().Matches(filter))
items_filter.push_back(a);
}
}
// Update scrollbar and refresh
updateLayout(viewed_index);
}
示例3: addGameExe
/* Executables::addGameExe
* Adds a new game executable definition for game [name]
*******************************************************************/
void Executables::addGameExe(string name)
{
game_exe_t game;
game.name = name;
name.Replace(" ", "_");
name.MakeLower();
game.id = name;
game_exes.push_back(game);
}