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> || <translate><!--T:312--> Returns the argument converted to lower case.</translate>
| <code>lcase</code> || Returns the argument converted to lower case.
|-
|-
| <code>ucase</code> || <translate><!--T:313--> Returns the argument converted to upper case.</translate>
| <code>ucase</code> || Returns the argument converted to upper case.
|-
|-
| <code>length</code> || <translate><!--T:314--> Returns the length of the string given as the argument.</translate> <translate><!--T:315--> If the argument is an array, returns its number of elements.</translate>
| <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> || <translate><!--T:316--> Casts to string data type.</translate> <translate><!--T:317--> If the argument is an array, implodes it with linebreaks.</translate>
| <code>string</code> || Casts to string data type.If the argument is an array, implodes it with linebreaks.
|-
|-
| <code>int</code> || <translate><!--T:318--> Casts to integer data type.</translate>
| <code>int</code> || Casts to integer data type.
|-
|-
| <code>float</code> || <translate><!--T:319--> Casts to floating-point data type.</translate>
| <code>float</code> || Casts to floating-point data type.
|-
|-
| <code>bool</code> || <translate><!--T:320--> Casts to boolean data type.</translate>
| <code>bool</code> || Casts to boolean data type.
|-
|-
| <code>norm</code> || <translate><!--T:321--> Equivalent to <tvar|1><code>rmwhitespace(rmspecials(rmdoubles(ccnorm(arg1))))</code></>.</translate>
| <code>norm</code> || Equivalent to <code>rmwhitespace(rmspecials(rmdoubles(ccnorm(arg1))))</code>.
|-
|-
| <code>ccnorm</code> || <translate><!--T:322--> Normalises confusable/similar characters in the argument, and returns a canonical form.</translate> <translate><!--T:323--> A list of characters and their replacements can be found [[<tvar|1>phab:source/Equivset/browse/master/data/equivset.in</>|on git]], e.g. <tvar|2><code>ccnorm( "Eeèéëēĕėęě3ƐƷ" ) === "EEEEEEEEEEEEE"</code></>.</translate><ref name="T27619"><translate><!--T:324--> Be aware of <tvar|1>[[phab:T27619]]</>.</translate> <translate><!--T:325--> You can use <tvar|1>[[Special:AbuseFilter/tools]]</> to evaluate <tvar|2><code>ccnorm( "your string" )</code></> to see which characters are transformed.</translate></ref> <translate><!--T:326--> The output of this function is always uppercase.</translate>
| <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>