博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
连字符分隔的大小写是什么? [关闭]
阅读量:2380 次
发布时间:2019-05-10

本文共 1678 字,大约阅读时间需要 5 分钟。

本文翻译自:

This is PascalCase: SomeSymbol 这是PascalCase: SomeSymbol

This is camelCase: someSymbol 这是someSymbolsomeSymbol

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中使用。


#1楼

参考:


#2楼

It's referred to as kebab-case . 这被称为kebab-case See . 请参阅 。


#3楼

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-casedash-casehyphen-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_casecamelCase类似的被广泛接受的名称。


#4楼

有时也称为毛毛虫箱


#5楼

Adding the correct link here 在此处添加正确的链接

which is All lowercase with - separating words. 全部为小写字母-分隔单词。


#6楼

我只是说这是 。

转载地址:http://huexb.baihongyu.com/

你可能感兴趣的文章
Unable to execute dex: Multiple dex files define 解决方法
查看>>
Cocos2dx3.2从零开始【五】
查看>>
字符画
查看>>
JS读取DropDownList中的值
查看>>
进度条例子
查看>>
WordPress注册支持中文用户名的解决办法
查看>>
设置WordPress评论头像为圆角鼠标触碰后旋转效果
查看>>
WordPress:删除多说插件的版权信息
查看>>
查询表中两个条件下的数目,按三列组成表
查看>>
WinForm下禁止TextBox右键菜单
查看>>
C#_winform_DataGridView_的18种常见属性
查看>>
C# 扩展系统类string的方法
查看>>
webBrowser强制在本窗口打开,禁止在新窗口打开
查看>>
C#获取CPU序列号代码、硬盘ID、网卡硬件地址等类文件
查看>>
Html常用符号
查看>>
WinForm控制Webbrowser自动登录
查看>>
access表(.mdb文件) 导入 power designer
查看>>
PowerDesigner如何设计表之间的关联
查看>>
SQLite通用数据库类
查看>>
CMD下修改IP地址!
查看>>