Id 是一个单词 identity 的缩写,url 是 uniform resource locator 缩写,4 楼说的就是标准答案了
hahadaxigua834
2023-01-22 13:28:16 +08:00
Words in names that are initialisms or acronyms (e.g., URL and NATO) should have the same case. URL should appear as URL or url (as in urlPony, or URLPony), never as Url. This also applies to ID when it is short for “identifier”; write appID instead of appId.
Now lowercase everything (including acronyms), then uppercase only the first character of: - ... each word, to yield upper camel case, or - ... each word except the first, to yield lower camel case