<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [capitalize](./x-components.capitalize.md)

## capitalize() function

Util to capitalize a string .

**Signature:**

```typescript
export declare function capitalize<StrType extends string>(str: StrType): Capitalize<StrType>;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

str


</td><td>

StrType


</td><td>

String value.


</td></tr>
</tbody></table>

**Returns:**

Capitalize&lt;StrType&gt;

Returns the string capitalized.

## Example

Transforms `query` into `Query`

