Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support \U\u\L\l replace modifiers in global search/replace (see PR #96128) #105101

Merged
merged 2 commits into from
Aug 25, 2020
Merged

Support \U\u\L\l replace modifiers in global search/replace (see PR #96128) #105101

merged 2 commits into from
Aug 25, 2020

Conversation

irridia
Copy link
Contributor

@irridia irridia commented Aug 20, 2020

Support \U\u\L\l modifiers to search replacement to alter word case in the global Find/Replace flow.

The behavior is patterned after Boost, but only applied to the replacement text, not subsequent content. Thus the \E isn't relevant. This is also vaguely similar to other replacement syntax, like pcre2 and perl.

For example, to export a file full of non-exported functions in a Go file:
Find:
^func (\w+)(
Replace:
func \u$1(
Example:
func myPrivateFunc(...
Result:
func MyPrivateFunc(...
With \U:
func MYPRIVATEFUNC(...
With \l\l\l\U:
func mypRIVATEFUNC(...

This PR broadens the implemetation as present in PR #96128.

@roblourens

@irridia irridia changed the title Suppert \U\u\L\l replace modifiers in global search/replace (see PR #96128) Support \U\u\L\l replace modifiers in global search/replace (see PR #96128) Aug 20, 2020
@roblourens roblourens assigned roblourens and unassigned rebornix Aug 24, 2020
@roblourens
Copy link
Member

I need to spend some more time testing this but at first look it looks great!

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@roblourens roblourens merged commit e64c80c into microsoft:master Aug 25, 2020
@roblourens roblourens added this to the August 2020 milestone Sep 1, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants