---
title: "lowerCase"
description: "将字符串转换为全小写，单词间用空格分隔 (hello world)。"
seo_title: "lowerCase"
seo_description: "Convert a string to lowercase words separated by single spaces, splitting camelCase, snake_case, and kebab-case input first."
canonical_url: "https://core.mhaibaraai.cn/docs/transformers/string/lower-case"
---
# lowerCase

> 将字符串转换为全小写，单词间用空格分隔 (hello world)。

## 用法

将字符串转换为小写格式，单词之间用空格分隔。

```ts
import { lowerCase } from '@movk/core'

lowerCase('firstName') // => 'first name'
lowerCase('First_Name') // => 'first name'
lowerCase('FIRST-NAME') // => 'first name'
lowerCase('XMLHttpRequest') // => 'xml http request'
```

## API

`lowerCase(str: string): string`

### 参数

**str** (`string`) *required*: 要转换的字符串。

### 返回值

**string**: 返回小写格式的字符串。

## Changelog

See commit history for [src/transformers/string/lowerCase.ts](https://github.com/mhaibaraai/movk-core/commits/main/src/transformers/string/lowerCase.ts).


## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
