Manager for for bad words.
More...
|
void | Load () |
| Loads the current filter with all settings from this object. More...
|
|
bool | Contains (string text, params string[] sourceNames) |
| Searches for bad words in a text. More...
|
|
void | ContainsAsync (string text, params string[] sourceNames) |
| Searches asynchronously for bad words in a text. Use the "OnContainsComplete"-callback to get the result. More...
|
|
System.Collections.Generic.List< string > | GetAll (string text, params string[] sourceNames) |
| Searches for bad words in a text. More...
|
|
void | GetAllAsync (string text, params string[] sourceNames) |
| Searches asynchronously for bad words in a text. Use the "OnGetAllComplete"-callback to get the result. More...
|
|
string | ReplaceAll (string text, bool markOnly=false, string prefix="", string postfix="", params string[] sourceNames) |
| Searches and replaces all bad words in a text. More...
|
|
void | ReplaceAllAsync (string text, bool markOnly=false, string prefix="", string postfix="", params string[] sourceNames) |
| Searches and replaces asynchronously all bad words in a text. Use the "OnReplaceAllComplete"-callback to get the result. More...
|
|
string | Mark (string text, bool replace=false, string prefix="<b><color=red>", string postfix="</color></b>", params string[] sourceNames) |
| Marks the text with a prefix and postfix. More...
|
|
string | Unmark (string text, string prefix="<b><color=red>", string postfix="</color></b>") |
| Unmarks the text with a prefix and postfix. More...
|
|
|
override void | Awake () |
|
override void | OnApplicationQuit () |
|
void | onContainsComplete (string text, bool result) |
|
void | onGetAllComplete (string text, System.Collections.Generic.List< string > badWords) |
|
void | onReplaceAllComplete (string originalText, string cleanText) |
|
|
string??? | ReplaceChars [get, set] |
| Replace characters for bad words. More...
|
|
ReplaceMode??? | Mode [get, set] |
| Replace mode operations on the input string. More...
|
|
bool??? | RemoveSpaces [get, set] |
| Remove unnecessary spaces between letters in the input string. More...
|
|
int??? | MaxTextLength [get, set] |
| Maximal text length for the space detection. More...
|
|
string??? | RemoveChars [get, set] |
| Remove unnecessary characters from the input string. More...
|
|
bool??? | SimpleCheck [get, set] |
| Use simple detection algorithm. This is the way to check for Chinese, Japanese, Korean and Thai bad words. More...
|
|
System.Collections.Generic.List< BadWordProvider > | BadWordProviderLTR [get, set] |
| List of all left-to-right providers. More...
|
|
System.Collections.Generic.List< BadWordProvider > | BadWordProviderRTL [get, set] |
| List of all right-to-left providers. More...
|
|
bool | DisableOrdering [get, set] |
|
abstract OnContainsCompleted | onContainsCompleted [get] |
|
abstract OnGetAllCompleted | onGetAllCompleted [get] |
|
abstract OnReplaceAllCompleted | onReplaceAllCompleted [get] |
|
Manager for for bad words.
◆ Contains()
bool Crosstales.BWF.Manager.BadWordManager.Contains |
( |
string |
text, |
|
|
params string[] |
sourceNames |
|
) |
| |
Searches for bad words in a text.
- Parameters
-
text | Text to check |
sourceNames | Relevant sources (e.g. "english", optional) |
- Returns
- True if a match was found
◆ ContainsAsync()
void Crosstales.BWF.Manager.BadWordManager.ContainsAsync |
( |
string |
text, |
|
|
params string[] |
sourceNames |
|
) |
| |
Searches asynchronously for bad words in a text. Use the "OnContainsComplete"-callback to get the result.
- Parameters
-
text | Text to check |
sourceNames | Relevant sources (e.g. "english", optional) |
◆ GetAll()
System.Collections.Generic.List<string> Crosstales.BWF.Manager.BadWordManager.GetAll |
( |
string |
text, |
|
|
params string[] |
sourceNames |
|
) |
| |
Searches for bad words in a text.
- Parameters
-
text | Text to check |
sourceNames | Relevant sources (e.g. "english", optional) |
- Returns
- List with all the matches
◆ GetAllAsync()
void Crosstales.BWF.Manager.BadWordManager.GetAllAsync |
( |
string |
text, |
|
|
params string[] |
sourceNames |
|
) |
| |
Searches asynchronously for bad words in a text. Use the "OnGetAllComplete"-callback to get the result.
- Parameters
-
text | Text to check |
sourceNames | Relevant sources (e.g. "english", optional) |
◆ Load()
void Crosstales.BWF.Manager.BadWordManager.Load |
( |
| ) |
|
Loads the current filter with all settings from this object.
◆ Mark()
string Crosstales.BWF.Manager.BadWordManager.Mark |
( |
string |
text, |
|
|
bool |
replace = false , |
|
|
string |
prefix = "<b><color=red>" , |
|
|
string |
postfix = "</color></b>" , |
|
|
params string[] |
sourceNames |
|
) |
| |
Marks the text with a prefix and postfix.
- Parameters
-
text | Text containing bad words |
replace | Replace the bad words (default: false, optional) |
prefix | Prefix for every found bad word (default: bold and red, optional) |
postfix | Postfix for every found bad word (default: bold and red, optional) |
sourceNames | Relevant sources (e.g. "english", optional) |
- Returns
- Text with marked domains
◆ ReplaceAll()
string Crosstales.BWF.Manager.BadWordManager.ReplaceAll |
( |
string |
text, |
|
|
bool |
markOnly = false , |
|
|
string |
prefix = "" , |
|
|
string |
postfix = "" , |
|
|
params string[] |
sourceNames |
|
) |
| |
Searches and replaces all bad words in a text.
- Parameters
-
text | Text to check |
markOnly | Only mark the words (default: false, optional) |
prefix | Prefix for every found bad word (optional) |
postfix | Postfix for every found bad word (optional) |
sourceNames | Relevant sources (e.g. "english", optional) |
- Returns
- Clean text
◆ ReplaceAllAsync()
void Crosstales.BWF.Manager.BadWordManager.ReplaceAllAsync |
( |
string |
text, |
|
|
bool |
markOnly = false , |
|
|
string |
prefix = "" , |
|
|
string |
postfix = "" , |
|
|
params string[] |
sourceNames |
|
) |
| |
Searches and replaces asynchronously all bad words in a text. Use the "OnReplaceAllComplete"-callback to get the result.
- Parameters
-
text | Text to check |
markOnly | Only mark the words (default: false, optional) |
prefix | Prefix for every found bad word (optional) |
postfix | Postfix for every found bad word (optional) |
sourceNames | Relevant sources (e.g. "english", optional) |
◆ ResetObject()
static void Crosstales.BWF.Manager.BadWordManager.ResetObject |
( |
| ) |
|
|
static |
◆ removeChars
string Crosstales.BWF.Manager.BadWordManager.removeChars |
Remove unnecessary characters from the input string.
◆ Sources
Returns all sources for the manager.
- Returns
- List with all sources for the manager
◆ TotalRegexCount
int Crosstales.BWF.Manager.BadWordManager.TotalRegexCount => Sources.Sum(src => src.RegexCount) |
Total number of Regex.
- Returns
- Total number of Regex.
◆ BadWordProviderLTR
System.Collections.Generic.List<BadWordProvider> Crosstales.BWF.Manager.BadWordManager.BadWordProviderLTR |
|
getset |
List of all left-to-right providers.
◆ BadWordProviderRTL
System.Collections.Generic.List<BadWordProvider> Crosstales.BWF.Manager.BadWordManager.BadWordProviderRTL |
|
getset |
List of all right-to-left providers.
◆ MaxTextLength
int??? Crosstales.BWF.Manager.BadWordManager.MaxTextLength |
|
getset |
Maximal text length for the space detection.
◆ Mode
ReplaceMode??? Crosstales.BWF.Manager.BadWordManager.Mode |
|
getset |
Replace mode operations on the input string.
◆ RemoveChars
string??? Crosstales.BWF.Manager.BadWordManager.RemoveChars |
|
getsetremove |
Remove unnecessary characters from the input string.
◆ RemoveSpaces
bool??? Crosstales.BWF.Manager.BadWordManager.RemoveSpaces |
|
getsetremove |
Remove unnecessary spaces between letters in the input string.
◆ ReplaceChars
string??? Crosstales.BWF.Manager.BadWordManager.ReplaceChars |
|
getset |
Replace characters for bad words.
◆ SimpleCheck
bool??? Crosstales.BWF.Manager.BadWordManager.SimpleCheck |
|
getset |
Use simple detection algorithm. This is the way to check for Chinese, Japanese, Korean and Thai bad words.
The documentation for this class was generated from the following file:
- C:/Users/slaub/Unity/assets/BWFPro/BWFPro/Assets/Plugins/crosstales/BadWordFilter/Scripts/Manager/BadWordManager.cs