Can anyone tell me how to rename variables like play_size_32,play_url_24_m4a in camelcase naming policy? I am deserializing json string, but I don't know how to deal with such variable names.
Camel case is the practice of capitalizing the first letter of each word in a series and then removing spaces, numbers, underscores, hyphens, and other special characters. This leaves a concatenation of words that is combined into a single string with various letters capitalized throughout.
Camel case starts each new word in a complex variable name with an uppercase letter. You can capitalize the first word as well or leave it lowercase. When the first letter of the variable starts with an uppercase letter, it is known as upper camel case.
CamelCase is a way to separate the words in a phrase by making the first letter of each word capitalized and not using spaces. It is commonly used in web URLs, programming and computer naming conventions. It is named after camels because the capital letters resemble the humps on a camel's back.
Methods should be verbs in lowerCamelCase or a multi-word name that begins with a verb in lowercase; that is, with the first letter lowercase and the first letters of subsequent words in uppercase. Local variables, instance variables, and class variables are also written in lowerCamelCase .
playSize32, playUrl24M4a
I agree that camel case is not great when dealing with numbers, you should try to avoid variables names containing them
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With