---
title: getRepeatCharacter - 计算字符串中重复字符以及重复字符的次数
nav:
  title: 使用文档
  path: /lib
group:
  path: /string
  title: 字符串操作
  order: 12
---

## getRepeatCharacter

Demo:

```tsx | pure
import { getRepeatCharacter } from 'xijs';

// 计算字符串中重复字符以及重复字符的次数
const res = getRepeatCharacter('bigBbbi');// ->{b: 3, i: 2, g: 1, B: 1}
```
