Skip to main content

String

Functions

escapePattern

String.escapePattern(sstring) → string

Escape magic string pattern characters: % . ( ) [ ] + - * ? ^ $

escapeRichText

String.escapeRichText(sstring) → string

Escape RichText tags

filterForUser

String.filterForUser(
messagestring,
fromUserIdnumber,
toUserIdnumber,
filterContextEnum.TextFilterContext?
) → string

Filters a message with TextService.FilterStringAsync

Show raw api
{
    "functions": [
        {
            "name": "escapePattern",
            "desc": "Escape magic string pattern characters: % . ( ) [ ] + - * ? ^ $",
            "params": [
                {
                    "name": "s",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 10,
                "path": "MainModule/Util/String.luau"
            }
        },
        {
            "name": "escapeRichText",
            "desc": "Escape RichText tags",
            "params": [
                {
                    "name": "s",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 15,
                "path": "MainModule/Util/String.luau"
            }
        },
        {
            "name": "filterForUser",
            "desc": "Filters a message with [TextService.FilterStringAsync]",
            "params": [
                {
                    "name": "message",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "fromUserId",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "toUserId",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "filterContext",
                    "desc": "",
                    "lua_type": "Enum.TextFilterContext?\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 56,
                "path": "MainModule/Util/String.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "String",
    "desc": "",
    "source": {
        "line": 7,
        "path": "MainModule/Util/String.luau"
    }
}