本文共 1678 字,大约阅读时间需要 5 分钟。
本文翻译自:
This is PascalCase: SomeSymbol
这是PascalCase: SomeSymbol
This is camelCase: someSymbol
这是someSymbol
: someSymbol
This is snake_case: some_symbol
这是snake_case: some_symbol
So my questions is whether there is a widely accepted name for this: some-symbol
? 所以我的问题是,是否有一个广泛接受的名称: some-symbol
? It's commonly used in url's. 通常在url中使用。
参考:
It's referred to as kebab-case . 这被称为kebab-case 。 See . 请参阅 。
There isn't really a standard name for this case convention, and there is disagreement over what it should be called. 这种情况下的约定实际上并没有一个标准名称,因此应如何称呼也存在分歧。
That said, as of 2019, there is a strong case to be made that kebab-case is winning: 就是说,从2019年开始,有充分的理由证明烤肉串案例会获胜:
spinal-case is a distant second, and no other terms have any traction at all. 脊柱情况是遥不可及的,其他术语根本没有任何吸引力。
Additionally, kebab-case has entered the lexicon of several javascript code libraries, eg: 另外, kebab-case已进入几个javascript代码库的词典,例如:
However, there are still other terms that people use. 但是,人们仍然使用其他术语。 Lisp has used this convention for decades as described in , so some people have described it as lisp-case . Lisp在已经描述了数十年的惯例,因此有人将其描述为lisp-case 。 Some other forms I've seen include caterpillar-case , dash-case , and hyphen-case , but none of these is standard. 我见过的其他一些形式包括caterpillar-case , dash-case和hyphen-case ,但是这些都不是标准的。
So the answer to your question is: No, there isn't a single widely-accepted name for this case convention analogous to snake_case or camelCase , which are widely-accepted. 因此,您的问题的答案是:不,这种情况下的约定没有一个与snake_case或camelCase类似的被广泛接受的名称。
有时也称为毛毛虫箱
Adding the correct link here 在此处添加正确的链接
which is All lowercase with - separating words. 全部为小写字母-分隔单词。
我只是说这是 。
转载地址:http://huexb.baihongyu.com/