Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. // If you want to convert a PascalCase variable to camelCase, you can do the following:
  2. // Where `n` is the tab stop you want to reference
  3. ${n/^(.)(.*)$/${1:/downcase}${2}/}
  4.  
  5. // Example: ${1:This is my original} => ${1/^(.)(.*)$/${1:/downcase}${2}/}
  6.  
  7.  
  8. // If you want to convert a camelCase variable to PascalCase, you can do the following:
  9. // Where `n` is the tab stop you want to reference
  10. ${n/^(.)(.*)$/${1:/upcase}${2}/}
  11.  
  12. // Example: ${1:This is my original} => ${1/^(.)(.*)$/${1:/upcase}${2}/}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement