Camel case and Pascal case mistake

后端 未结 7 2070
我在风中等你
我在风中等你 2020-12-29 18:26

I constantly forget which is Camel case and which is Pascal case. So I thought that maybe a little history will help. Where do the names of these conventions come from? Is t

7条回答
  •  情书的邮戳
    2020-12-29 18:58

    For anyone looking, here's a Python module that'll do either case: to-camel-case

    pip install to-camel-case
    
    import to_camel_case
    
    to_camel_case('snake_case') # snakeCase
    
    to_camel_case('snake_case', pascal=True) # SnakeCase
    

    Full disclosure: I'm the author

提交回复
热议问题