hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
57 lines (27 loc) • 868 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [client](./client.md) > [HytopiaUI](./client.hytopiaui.md) > [filterProfanity](./client.hytopiaui.filterprofanity.md)
## HytopiaUI.filterProfanity() method
Filters inappropriate language from text by replacing profanity with asterisks. Use this to sanitize user-generated content displayed in your UI (e.g., chat messages, usernames).
**Signature:**
```typescript
filterProfanity(text: string): string;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
text
</td><td>
string
</td><td>
Text to filter
</td></tr>
</tbody></table>
**Returns:**
string
Filtered text with profanity replaced by asterisks