> For the complete documentation index, see [llms.txt](https://jscula.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jscula.gitbook.io/docs/utils/case-conversions/cameltokebab.md).

# camelToKebab

Converts a camelCase string to a kebab-case string.

This function converts a `camelCase` string to a `kebab-case` string.

**Parameters**

* `str` **{string}**: The `camelCase` string to convert.

**Returns**

* **{string}**: The converted `kebab-case` string.

```javascript
// Example 1
const result1 = camelToKebab('camelCaseString');
console.log(result1); // Output: camel-case-string

// Example 2
const result2 = camelToKebab('anotherExampleString');
console.log(result2); // Output: another-example-string
```
