<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Gameplay%3A%3AcompareStrings</id>
	<title>Gameplay::compareStrings - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Gameplay%3A%3AcompareStrings"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Gameplay::compareStrings&amp;action=history"/>
	<updated>2026-07-24T21:11:05Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=Gameplay::compareStrings&amp;diff=9773&amp;oldid=prev</id>
		<title>imported&gt;Shr0x: /* See also */</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Gameplay::compareStrings&amp;diff=9773&amp;oldid=prev"/>
		<updated>2024-07-22T10:07:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;See also&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Compares two strings up to a specified number of characters.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Parameters:&amp;lt;br&amp;gt;str1 - String to be compared.&amp;lt;br&amp;gt;str2 - String to be compared.&amp;lt;br&amp;gt;matchCase - Comparison will be case-sensitive.&amp;lt;br&amp;gt;maxLength - Maximum number of characters to compare. A value of -1 indicates an infinite length.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Returns:&amp;lt;br&amp;gt;A value indicating the relationship between the strings:&amp;lt;br&amp;gt;&amp;amp;lt;0 - The first non-matching character in &amp;#039;str1&amp;#039; is less than the one in &amp;#039;str2&amp;#039;. (e.g. &amp;#039;A&amp;#039; &amp;amp;lt; &amp;#039;B&amp;#039;, so result = -1)&amp;lt;br&amp;gt;0 - The contents of both strings are equal.&amp;lt;br&amp;gt;&amp;amp;gt;0 - The first non-matching character in &amp;#039;str1&amp;#039; is less than the one in &amp;#039;str2&amp;#039;. (e.g. &amp;#039;B&amp;#039; &amp;amp;gt; &amp;#039;A&amp;#039;, so result = 1)&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Examples:&amp;lt;br&amp;gt;GAMEPLAY::COMPARE_STRINGS(&amp;#039;STRING&amp;#039;, &amp;#039;string&amp;#039;, false, -1); // 0; equal&amp;lt;br&amp;gt;GAMEPLAY::COMPARE_STRINGS(&amp;#039;TESTING&amp;#039;, &amp;#039;test&amp;#039;, false, 4); // 0; equal&amp;lt;br&amp;gt;GAMEPLAY::COMPARE_STRINGS(&amp;#039;R2D2&amp;#039;, &amp;#039;R2xx&amp;#039;, false, 2); // 0; equal&amp;lt;br&amp;gt;GAMEPLAY::COMPARE_STRINGS(&amp;#039;foo&amp;#039;, &amp;#039;bar&amp;#039;, false, -1); // 4; &amp;#039;f&amp;#039; &amp;amp;gt; &amp;#039;b&amp;#039;&amp;lt;br&amp;gt;GAMEPLAY::COMPARE_STRINGS(&amp;#039;A&amp;#039;, &amp;#039;A&amp;#039;, true, 1); // 0; equal&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;When comparing case-sensitive strings, lower-case characters are greater than upper-case characters:&amp;lt;br&amp;gt;GAMEPLAY::COMPARE_STRINGS(&amp;#039;A&amp;#039;, &amp;#039;a&amp;#039;, true, 1); // -1; &amp;#039;A&amp;#039; &amp;amp;lt; &amp;#039;a&amp;#039;&amp;lt;br&amp;gt;GAMEPLAY::COMPARE_STRINGS(&amp;#039;a&amp;#039;, &amp;#039;A&amp;#039;, true, 1); // 1; &amp;#039;a&amp;#039; &amp;amp;gt; &amp;#039;A&amp;#039;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;mp.game.gameplay.compareStrings(str1, str2, matchCase, maxLength);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Required Arguments ===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;str1:&amp;#039;&amp;#039;&amp;#039; String&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;str2:&amp;#039;&amp;#039;&amp;#039; String&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;matchCase:&amp;#039;&amp;#039;&amp;#039; Boolean&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;maxLength:&amp;#039;&amp;#039;&amp;#039; int&lt;br /&gt;
===Return value===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;int&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// todo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==See also==&lt;br /&gt;
{{Gameplay_functions_c}}&lt;br /&gt;
[[Category:Clientside API]]&lt;br /&gt;
[[Category:TODO: Example]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Shr0x</name></author>
	</entry>
</feed>