Converting snake_case to camelCase with vscode

Open the find/replace and click on the .*

In the first input use _([a-zA-Z])

In the second use \U$1

Now just convert everything and be happy converting SQL/JSON to object variables/params or anything else.


This content originally appeared on DEV Community and was authored by Alan Schio

The screenshot of the finder tool from VSCode

  • Open the find/replace and click on the .*
  • In the first input use _([a-zA-Z])
  • In the second use \U$1

The screenshot of the finder tool from VSCode with the inputs filled

Now just convert everything and be happy converting SQL/JSON to object variables/params or anything else.

Gif of the replace working on


This content originally appeared on DEV Community and was authored by Alan Schio


Print Share Comment Cite Upload Translate Updates
APA

Alan Schio | Sciencx (2024-07-17T19:02:53+00:00) Converting snake_case to camelCase with vscode. Retrieved from https://www.scien.cx/2024/07/17/converting-snake_case-to-camelcase-with-vscode/

MLA
" » Converting snake_case to camelCase with vscode." Alan Schio | Sciencx - Wednesday July 17, 2024, https://www.scien.cx/2024/07/17/converting-snake_case-to-camelcase-with-vscode/
HARVARD
Alan Schio | Sciencx Wednesday July 17, 2024 » Converting snake_case to camelCase with vscode., viewed ,<https://www.scien.cx/2024/07/17/converting-snake_case-to-camelcase-with-vscode/>
VANCOUVER
Alan Schio | Sciencx - » Converting snake_case to camelCase with vscode. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/17/converting-snake_case-to-camelcase-with-vscode/
CHICAGO
" » Converting snake_case to camelCase with vscode." Alan Schio | Sciencx - Accessed . https://www.scien.cx/2024/07/17/converting-snake_case-to-camelcase-with-vscode/
IEEE
" » Converting snake_case to camelCase with vscode." Alan Schio | Sciencx [Online]. Available: https://www.scien.cx/2024/07/17/converting-snake_case-to-camelcase-with-vscode/. [Accessed: ]
rf:citation
» Converting snake_case to camelCase with vscode | Alan Schio | Sciencx | https://www.scien.cx/2024/07/17/converting-snake_case-to-camelcase-with-vscode/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.