当前位置: 首页>>代码示例>>C++>>正文


C++ WideString::replace方法代码示例

本文整理汇总了C++中WideString::replace方法的典型用法代码示例。如果您正苦于以下问题:C++ WideString::replace方法的具体用法?C++ WideString::replace怎么用?C++ WideString::replace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WideString的用法示例。


在下文中一共展示了WideString::replace方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetAppliedChanges

WideString UITextField::GetAppliedChanges(int32 replacementLocation, int32 replacementLength, const WideString & replacementString)
{//TODO: fix this for copy/paste
    WideString txt = GetText();
    
    if(replacementLocation >= 0)
    {
        txt.replace(replacementLocation, replacementLength, replacementString);
    }
    
    return txt;
}
开发者ID:boyjimeking,项目名称:dava.framework,代码行数:11,代码来源:UITextField.cpp

示例2: untabify

void Editor::untabify(WideString& text)
{
  int width = settings->tabSize;
  for (int i = 0; text[i]; i++)
  {
    if (text[i] == '\t')
    {
      text.replace(i, ' ');
      //int extra = (width - (i % width)) - 1;
      //for (int i = 0; i < extra; i++)
      //  text.insert(i, ' ');
    }
  }
}
开发者ID:Soulflare3,项目名称:ilua,代码行数:14,代码来源:editor.cpp

示例3: TextFieldKeyPressed

bool InputTest::TextFieldKeyPressed(UITextField * textField, int32 replacementLocation, int32 replacementLength, const WideString & replacementString)
{
	if (replacementLocation < 0 || replacementLength < 0)
	{
		staticText->SetText(L"");
		return true;
	}

	WideString resultString = textField->GetText();
	resultString.replace(replacementLocation, replacementLength, replacementString);
	staticText->SetText(resultString);

	return true;
}
开发者ID:droidenko,项目名称:dava.framework,代码行数:14,代码来源:InputTest.cpp

示例4: TextFieldKeyPressed

bool UITextFieldAndroid::TextFieldKeyPressed(int32 replacementLocation, int32 replacementLength, const WideString &text)
{
	bool res = true;
	UITextFieldDelegate* delegate = textField->GetDelegate();
	if (delegate)
		res = delegate->TextFieldKeyPressed(textField, replacementLocation, replacementLength, text);

	if (res)
	{
		WideString curText = textField->GetText();
		if (curText.length() >= replacementLocation)
		{
			curText.replace(replacementLocation, replacementLength, text);
			this->text = curText;
		}
	}
	return res;
}
开发者ID:droidenko,项目名称:dava.framework,代码行数:18,代码来源:UITextFieldAndroid.cpp


注:本文中的WideString::replace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。