本文整理汇总了C++中std::string::MakeUpper方法的典型用法代码示例。如果您正苦于以下问题:C++ string::MakeUpper方法的具体用法?C++ string::MakeUpper怎么用?C++ string::MakeUpper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类std::string
的用法示例。
在下文中一共展示了string::MakeUpper方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: grid_cursor
bool wex::grid::find_next(const std::string& text, bool forward)
{
if (text.empty())
{
return false;
}
static bool recursive = false;
static int start_row;
static int end_row;
static int init_row;
static int start_col;
static int end_col;
wxString text_use = text;
if (!find_replace_data::get()->match_case())
{
text_use.MakeUpper();
}
wxGridCellCoords grid_cursor(GetGridCursorRow(), GetGridCursorCol());
if (forward)
{
init_row = 0;
if (recursive)
{
start_row = init_row;
start_col = 0;
}
else
{
start_row = grid_cursor.GetRow() + 1;
start_col = grid_cursor.GetCol();
}
end_row = GetNumberRows();
end_col = GetNumberCols();
}
else
{
init_row = GetNumberRows() - 1;
if (recursive)
{
start_row = init_row;
start_col = GetNumberCols() - 1;
}
else
{
start_row = grid_cursor.GetRow() - 1;
start_col = grid_cursor.GetCol();
}
end_row = -1;
end_col = -1;
}
if (start_col == -1)
{
start_col = 0;
}
if (start_row == -1)
{
start_row = 0;
}
wxGridCellCoords match;
for (int j = start_col; j != end_col && !match; (forward ? j++: j--))
{
for (int i = (j == start_col ? start_row: init_row);
i != end_row && !match;
(forward ? i++: i--))
{
wxString text = GetCellValue(i, j);
if (!find_replace_data::get()->match_case())
{
text.MakeUpper();
}
if (find_replace_data::get()->match_word())
{
if (text == text_use)
{
match = wxGridCellCoords(i, j);
}
}
else
{
if (text.Contains(text_use))
{
match = wxGridCellCoords(i, j);
}
}
}
//.........这里部分代码省略.........