Visual Studio“查找和环绕"而不是“查找和替换" [英] Visual Studio 'Find and Surround With' instead of 'Find and Replace'

查看:48
本文介绍了Visual Studio“查找和环绕"而不是“查找和替换"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我想用 _T(...) 来包围我们 C++ 源代码中的所有字符串文字,用于我们的 unicode 端口.

So i want to surround all string literals in our C++ source with an _T(...) for our unicode port.

这个问题回答了我如何搜索字符串文字,但是否有某种方法可以解决用 _T() 匹配文本而不是用其他东西替换?

This questions answers how I search for string literals but is there some way of surrounding the matched text with _T() instead of replacing with something else?

无论如何,我打算一次执行一个字符串,而不是一次执行所有操作,但希望避免必须将其输入或使用 Visual Assist 中的Surround With"来为每个字符串执行此操作.

I intend to do it one string at a time anyway and not all at once but want to avoid having to type it out or use "Surround With" from Visual Assist myself for each string.

推荐答案

转到:编辑|查找和替换...|快速替换...然后输入:

Goto: Edit|Find and Replace...|Quick Replace.. Then enter:

Find: :q
Replace with : _T(\0)
Use: Regular Expressions

这篇关于Visual Studio“查找和环绕"而不是“查找和替换"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆