Interface for all filters. More...
Public Member Functions | |
bool | Contains (string text, params string[] sourceNames) |
Searches for bad words in a text. More... | |
System.Collections.Generic.List< string > | GetAll (string text, params string[] sourceNames) |
Searches for bad words in a text. 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... | |
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... | |
Properties | |
System.Collections.Generic.List< Crosstales.BWF.Data.Source > | Sources [get] |
All sources of the current filter. More... | |
bool | isReady [get] |
Checks the readiness status of the current filter. More... | |
Detailed Description
Interface for all filters.
Member Function Documentation
◆ Contains()
bool Crosstales.BWF.Filter.IFilter.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
Implemented in Crosstales.BWF.Filter.BadWordFilter, Crosstales.BWF.Filter.DomainFilter, Crosstales.BWF.Filter.BaseFilter, Crosstales.BWF.Filter.CapitalizationFilter, and Crosstales.BWF.Filter.PunctuationFilter.
◆ GetAll()
System.Collections.Generic.List<string> Crosstales.BWF.Filter.IFilter.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
Implemented in Crosstales.BWF.Filter.BadWordFilter, Crosstales.BWF.Filter.DomainFilter, Crosstales.BWF.Filter.CapitalizationFilter, Crosstales.BWF.Filter.PunctuationFilter, and Crosstales.BWF.Filter.BaseFilter.
◆ Mark()
string Crosstales.BWF.Filter.IFilter.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
Implemented in Crosstales.BWF.Filter.BaseFilter.
◆ ReplaceAll()
string Crosstales.BWF.Filter.IFilter.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
Implemented in Crosstales.BWF.Filter.BadWordFilter, Crosstales.BWF.Filter.DomainFilter, Crosstales.BWF.Filter.PunctuationFilter, Crosstales.BWF.Filter.CapitalizationFilter, and Crosstales.BWF.Filter.BaseFilter.
◆ Unmark()
string Crosstales.BWF.Filter.IFilter.Unmark | ( | string | text, |
string | prefix = "<b><color=red>" , |
||
string | postfix = "</color></b>" |
||
) |
Unmarks the text with a prefix and postfix.
- Parameters
-
text Text with marked bad words prefix Prefix for every found bad word (optional) postfix Postfix for every found bad word (optional)
- Returns
- Text with marked bad words
Implemented in Crosstales.BWF.Filter.BaseFilter.
Property Documentation
◆ isReady
|
get |
Checks the readiness status of the current filter.
- Returns
- True if the filter is ready.
◆ Sources
|
get |
All sources of the current filter.
- Returns
- List with all sources for the current filter
The documentation for this interface was generated from the following file:
- C:/Users/slaub/Unity/assets/BWFPro/BWFPro/Assets/Plugins/crosstales/BadWordFilter/Scripts/Filter/IFilter.cs