2010-08-22 13:13:17 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
|
|
<!DOCTYPE funcs
|
|
|
|
SYSTEM '../../../clonk.dtd'>
|
2009-09-16 01:29:20 +00:00
|
|
|
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
|
|
|
<funcs>
|
|
|
|
<func>
|
|
|
|
<title>WildcardMatch</title>
|
2010-08-22 13:13:17 +00:00
|
|
|
<category>Script</category>
|
|
|
|
<subcat>Strings</subcat>
|
2011-06-30 10:52:55 +00:00
|
|
|
<version>5.1 OC</version>
|
2009-09-16 01:29:20 +00:00
|
|
|
<syntax>
|
|
|
|
<rtype>string</rtype>
|
|
|
|
<params>
|
2010-08-22 13:13:17 +00:00
|
|
|
<param>
|
|
|
|
<type>string</type>
|
|
|
|
<name>text</name>
|
|
|
|
<desc>String to compare.</desc>
|
|
|
|
</param>
|
|
|
|
<param>
|
|
|
|
<type>string</type>
|
|
|
|
<name>wildcard</name>
|
|
|
|
<desc>String to compare.</desc>
|
|
|
|
</param>
|
2009-09-16 01:29:20 +00:00
|
|
|
</params>
|
|
|
|
</syntax>
|
2011-06-30 12:23:24 +00:00
|
|
|
<desc>Returns whether two strings are equal. The comparison is case sensitive and wildcards are supported.</desc>
|
2010-08-22 13:13:17 +00:00
|
|
|
<remark>A * can represent any number of unknown characters (including none). A ? represents exactly one unknown character.</remark>
|
2009-09-16 01:29:20 +00:00
|
|
|
<examples>
|
|
|
|
<example>
|
2010-08-22 13:13:17 +00:00
|
|
|
<code>public func IsRiding() { return WildcardMatch(<funclink>GetAction</funclink>(), "Ride*"); }</code>
|
|
|
|
<text>Returns <code>true</code> for all actions starting with "Ride" ("Ride" itself, but also "RideStill", "RideThrow", etc.).</text>
|
2009-09-16 01:29:20 +00:00
|
|
|
</example>
|
|
|
|
<example>
|
2010-08-22 13:13:17 +00:00
|
|
|
<code>WildcardMatch("Explode1", "Explode?");</code>
|
|
|
|
<text>Is <code>true</code>.</text>
|
2009-09-16 01:29:20 +00:00
|
|
|
</example>
|
|
|
|
<example>
|
2010-08-22 13:13:17 +00:00
|
|
|
<code>WildcardMatch("Explode10", "Explode?");</code>
|
|
|
|
<text>Is <code>false</code>.</text>
|
2009-09-16 01:29:20 +00:00
|
|
|
</example>
|
|
|
|
<example>
|
2010-08-22 13:13:17 +00:00
|
|
|
<code>WildcardMatch(GetName(), "*purz*");</code>
|
|
|
|
<text>Checks whether the name of the calling object contains "purz" (no matter where).</text>
|
2009-09-16 01:29:20 +00:00
|
|
|
</example>
|
|
|
|
</examples>
|
|
|
|
</func>
|
2010-08-22 13:13:17 +00:00
|
|
|
<author>Clonkonaut</author><date>2008-05</date>
|
2009-09-16 01:29:20 +00:00
|
|
|
</funcs>
|