目录

dasherize()

功能

将字符串写法转换成连字符 - 的写法。

语法

langx.dasherize(str)

参数

范例

Example: dasherize(“skyLark”),b 显示结果 sky-lary。

<!DOCTYPE html>
<html>

<head>
    <style>
    </style>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.3/require.min.js"></script>
    <script>
    require.config({
        baseUrl: "./",
        packages: [{
            name: "skylark",
            location: "../../../src/skylark"
        }, ]
    });
    </script>
</head>

<body>
   dasherize("skyLark") . result <b></b>
    <script>
    require(["skylark/finder", "skylark/langx", "skylark/datax"], function(finder, utils, datax) {
        datax.text(finder.find("b"), langx.dasherize("skyLary"));
    });
    </script>
</body>

</html>