User:松/Drafts/Extension:AbuseFilter/Rules format: Difference between revisions

→‎Functions: Translation code removal.
mNo edit summary
(→‎Functions: Translation code removal.)
Line 693:
! name !! description
|-
| <code>lcase</code> || <translate><!--T:312--> Returns the argument converted to lower case.</translate>
|-
| <code>ucase</code> || <translate><!--T:313--> Returns the argument converted to upper case.</translate>
|-
| <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>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>int</code> || <translate><!--T:318--> Casts to integer data type.</translate>
|-
| <code>float</code> || <translate><!--T:319--> Casts to floating-point data type.</translate>
|-
| <code>bool</code> || <translate><!--T:320--> Casts to boolean data type.</translate>
|-
| <code>norm</code> || <translate><!--T:321--> Equivalent to <tvar|1> <code>rmwhitespace(rmspecials(rmdoubles(ccnorm(arg1))))</code></>.</translate>
|-
| <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_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>
222

edits