Actions

API17

Difference between revisions of "JString::strcmp"

From Joomla! Documentation

(Layout updates)
(Updated to r1448:247ba8d88526)
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 (line 256)
+
** [[JArrayHelper::_sortObjects/11.1|JArrayHelper::_sortObjects]]
* see source code in [[jplatform:utilities/string.php#cl-256|BitBucket]]
+
===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 [[JString/11.1|JString]]
 +
* {{JVer|11.1}} Subpackage [[Subpackage_Utilities/11.1|Utilities]]
 +
* [[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 57: Line 59:
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
 
<noinclude>[[Category:JString]][[Category:JString::strcmp]]</noinclude>
 
<noinclude>[[Category:JString]][[Category:JString::strcmp]]</noinclude>

Revision as of 21:44, 27 April 2011

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Joomla 11.1 JString::strcmp

Description

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

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

SeeAlso:JString::strcmp [Edit See Also]

User contributed notes

<CodeExamplesForm />