API17

Difference between revisions of "JString::strcmp"

From Joomla! Documentation

(Bulk upload by Doxiki2)
 
m (moving preparation)
(4 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
=={{JVer|11.1}} JString::strcmp==
 
=={{JVer|11.1}} JString::strcmp==
 
===Description===
 
===Description===
UTF-8/LOCALE aware alternative to strcmp A case sensivite string comparison.  
+
UTF-8/LOCALE aware alternative to strcmp A case sensitive string comparison.  
  
 
{{Description:JString::strcmp}}
 
{{Description:JString::strcmp}}
Line 8: Line 8:
 
<nowiki>[</nowiki>[[Description:JString::strcmp|Edit Descripton]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[Description:JString::strcmp|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
</span>
===Synopsis===
 
 
<source lang="php">
 
<source lang="php">
public static JString::strcmp ($str1, $str2, $locale=false)
+
public static function strcmp (
 +
        $str1
 +
        $str2
 +
        $locale=false
 +
)
 
</source>
 
</source>
 
{| class="wikitable"
 
{| class="wikitable"
Line 32: Line 35:
 
|mixed
 
|mixed
 
|false
 
|false
|The locale used by strcoll or false to use classical comparison  
+
|The locale used by strcoll or false to use classical comparison
 
|-
 
|-
 
|}
 
|}
===Returns===
+
* '''Returns''' int < 0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal.
int < 0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal.
+
* '''Defined''' on line 247 of libraries/joomla/utilities/string.php
===Defined in===
+
* '''Referenced by'''
libraries/joomla/utilities/string.php
+
** [[API17:JArrayHelper::_sortObjects|JArrayHelper::_sortObjects]]
===Referenced by===
 
* [[JArrayHelper/_sortObjects/11.1|JArrayHelper::_sortObjects]]
 
 
===See also===
 
===See also===
 +
* {{JVer|11.1}} '''JString::strcmp source code''' on [[jplatform:utilities/string.php#cl-239|BitBucket]]
 +
* {{JVer|11.1}} Class [[API17:JString|JString]]
 +
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Utilities|Utilities]]
 +
* [[API17:JString::strcmp|Other versions of JString::strcmp]]
 +
{{SeeAlso:JString::strcmp}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JString::strcmp|Edit See Also]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[SeeAlso:JString::strcmp|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
</span>
* [[JString/11.1|JString]]
+
===User contributed notes===
* [[JString::strcmp|Other versions of this method]]
 
{{SeeAlso:JString::strcmp}}
 
===Examples===
 
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 56: Line 59:
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
<noinclude>[[Category:JString]][[Category:JString::strcmp]]</noinclude>
+
<noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude>

Revision as of 21:36, 11 May 2013

The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Joomla 11.1 JString::strcmp[edit]

Description[edit]

UTF-8/LOCALE aware alternative to strcmp A case sensitive string comparison.

Template:Description:JString::strcmp [Edit Descripton]

public static function strcmp (
        $str1
        $str2
        $locale=false
)
Parameter Type Default Description
$str1 string string 1 to compare
$str2 string string 2 to compare
$locale mixed false The locale used by strcoll or false to use classical comparison
  • Returns int < 0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal.
  • Defined on line 247 of libraries/joomla/utilities/string.php
  • Referenced by

See also[edit]

Template:SeeAlso:JString::strcmp [Edit See Also]

User contributed notes[edit]

<CodeExamplesForm />