User:松/Drafts/Extension:AbuseFilter/Rules format: Difference between revisions
Content added Content deleted
mNo edit summary |
(→Functions: Translation code removal.) |
||
Line 693: | Line 693: | ||
! name !! description |
! name !! description |
||
|- |
|- |
||
| <code>lcase</code> || |
| <code>lcase</code> || Returns the argument converted to lower case. |
||
|- |
|- |
||
| <code>ucase</code> || |
| <code>ucase</code> || Returns the argument converted to upper case. |
||
|- |
|- |
||
| <code>length</code> || |
| <code>length</code> || Returns the length of the string given as the argument.If the argument is an array, returns its number of elements. |
||
|- |
|- |
||
| <code>string</code> || |
| <code>string</code> || Casts to string data type.If the argument is an array, implodes it with linebreaks. |
||
|- |
|- |
||
| <code>int</code> || |
| <code>int</code> || Casts to integer data type. |
||
|- |
|- |
||
| <code>float</code> || |
| <code>float</code> || Casts to floating-point data type. |
||
|- |
|- |
||
| <code>bool</code> || |
| <code>bool</code> || Casts to boolean data type. |
||
|- |
|- |
||
| <code>norm</code> || |
| <code>norm</code> || Equivalent to <code>rmwhitespace(rmspecials(rmdoubles(ccnorm(arg1))))</code>. |
||
|- |
|- |
||
| <code>ccnorm</code> || |
| <code>ccnorm</code> || Normalises confusable/similar characters in the argument, and returns a canonical form.A list of characters and their replacements can be found [[phab:source/Equivset/browse/master/data/equivset.in|on git]], e.g. <code>ccnorm( "Eeèéëēĕėęě3ƐƷ" ) === "EEEEEEEEEEEEE"</code>.<ref name="T27619">Be aware of [[phab:T27619]].You can use [[Special:AbuseFilter/tools]] to evaluate <code>ccnorm( "your string" )</code> to see which characters are transformed.</ref>The output of this function is always uppercase. |
||
|- |
|- |
||
| <code>ccnorm_contains_any</code> || <translate><!--T:327--> Normalises confusable/similar characters in the arguments, and returns true if the first string contains '''any''' string from the following arguments (unlimited number of arguments, logic OR mode).</translate> <translate><!--T:328--> A list of characters and their replacements can be found [[<tvar|1>phab:source/Equivset/browse/master/data/equivset.in</>|on git]].</translate> |
| <code>ccnorm_contains_any</code> || <translate><!--T:327--> Normalises confusable/similar characters in the arguments, and returns true if the first string contains '''any''' string from the following arguments (unlimited number of arguments, logic OR mode).</translate> <translate><!--T:328--> A list of characters and their replacements can be found [[<tvar|1>phab:source/Equivset/browse/master/data/equivset.in</>|on git]].</translate> |