garrysmod icon indicating copy to clipboard operation
garrysmod copied to clipboard

Add a casing style parameter to AccessorFunc()

Open TomDotBat opened this issue 3 years ago • 4 comments

This adds a new parameter to AccessorFunc which makes it possible to change the casing style by passing a CASING_ enum. The casing styles I have added are:

  • PascalCase
  • camelCase
  • snake_case
  • UPPER_SNAKE_CASE

This will be extremely helpful to people who don't want to use PascalCase on their table methods. To ensure compatibility isn't broken, PascalCase will be the default option when the casing parameter isn't populated.

TomDotBat avatar Mar 06 '21 18:03 TomDotBat

All mah homies love UPPER_SNAKE_CASE

garryspins avatar Mar 06 '21 18:03 garryspins

ButPascalCase IsReallyEpic

TobyDHKing avatar Mar 06 '21 18:03 TobyDHKing

Gmod uses this function for its own styling

GitSparTV avatar Mar 06 '21 19:03 GitSparTV

PascalCase is the way to go

thekillertoaster avatar Mar 10 '21 00:03 thekillertoaster