Filter for excessive capitalization. The class can also replace all capitalizations inside a string.
More...
|
| CapitalizationFilter (int capitalizationCharsNumber=3, bool disableOrdering=false) |
| Instantiate the class. More...
|
|
override bool | Contains (string text, params string[] sourceNames) |
| Searches for bad words in a text. More...
|
|
override System.Collections.Generic.List< string > | GetAll (string text, params string[] sourceNames) |
| Searches for bad words in a text. More...
|
|
override string | ReplaceAll (string text, bool markOnly=false, string prefix="", string postfix="", params string[] sourceNames) |
| Searches and replaces all bad words in a text. More...
|
|
| BaseFilter (bool disableOrdering) |
| Instantiate the class. More...
|
|
virtual string | Unmark (string text, string prefix="<b><color=red>", string postfix="</color></b>") |
| Unmarks the text with a prefix and postfix. More...
|
|
virtual 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...
|
|
|
override bool | isReady => true |
| Checks the readiness status of the filter. More...
|
|
bool | DisableOrdering |
|
|
static void | logFilterNotReady () |
|
static void | logResourceNotFound (string res) |
|
static void | logContains () |
|
static void | logGetAll () |
|
static void | logReplaceAll () |
|
readonly System.Collections.Generic.Dictionary< string, Source > | _sources = new System.Collections.Generic.Dictionary<string, Source>() |
|
readonly System.Collections.Generic.List< string > | _getAllResult = new System.Collections.Generic.List<string>() |
|
Filter for excessive capitalization. The class can also replace all capitalizations inside a string.
◆ CapitalizationFilter()
Crosstales.BWF.Filter.CapitalizationFilter.CapitalizationFilter |
( |
int |
capitalizationCharsNumber = 3 , |
|
|
bool |
disableOrdering = false |
|
) |
| |
Instantiate the class.
- Parameters
-
capitalizationCharsNumber | Defines the number of allowed capital letters in a row (default: 3, optional). |
disableOrdering | Disables the ordering of the 'GetAll'-method (default: false, optional). |
◆ Contains()
override bool Crosstales.BWF.Filter.CapitalizationFilter.Contains |
( |
string |
text, |
|
|
params string[] |
sourceNames |
|
) |
| |
|
virtual |
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
Implements Crosstales.BWF.Filter.BaseFilter.
◆ GetAll()
override System.Collections.Generic.List<string> Crosstales.BWF.Filter.CapitalizationFilter.GetAll |
( |
string |
text, |
|
|
params string[] |
sourceNames |
|
) |
| |
|
virtual |
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
Implements Crosstales.BWF.Filter.BaseFilter.
◆ ReplaceAll()
override string Crosstales.BWF.Filter.CapitalizationFilter.ReplaceAll |
( |
string |
text, |
|
|
bool |
markOnly = false , |
|
|
string |
prefix = "" , |
|
|
string |
postfix = "" , |
|
|
params string[] |
sourceNames |
|
) |
| |
|
virtual |
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
Implements Crosstales.BWF.Filter.BaseFilter.
◆ isReady
override bool Crosstales.BWF.Filter.CapitalizationFilter.isReady => true |
Checks the readiness status of the filter.
- Returns
- True if the filter is ready.
◆ CharacterNumber
int? Crosstales.BWF.Filter.CapitalizationFilter.CharacterNumber |
|
getset |
Defines the number of allowed capital letters in a row.
◆ RegularExpression
System.Text.RegularExpressions.Regex Crosstales.BWF.Filter.CapitalizationFilter.RegularExpression |
|
get |
RegEx to find excessive capitalization.
The documentation for this class was generated from the following file:
- C:/Users/slaub/Unity/assets/BWFPro/BWFPro/Assets/Plugins/crosstales/BadWordFilter/Scripts/Filter/CapitalizationFilter.cs