JString/1.5
From Joomla! Documentation
< JString(Difference between revisions)
(Layout updates) |
m (→See also: fixing link to API) |
||
| Line 98: | Line 98: | ||
<source lang="php">jimport( 'joomla.utilities.string' );</source> | <source lang="php">jimport( 'joomla.utilities.string' );</source> | ||
===See also=== | ===See also=== | ||
| − | * {{JVer|1.5}} '''JString''' on [http://api.joomla.org/Joomla-Framework/Utilities/JString.html api.joomla.org] | + | * {{JVer|1.5}} '''JString''' on [http://api.joomla.org/1.5/Joomla-Framework/Utilities/JString.html api.joomla.org] |
* {{JVer|1.5}} '''JString source code''' on [[jframework15:utilities/string.php|JoomlaCode]] | * {{JVer|1.5}} '''JString source code''' on [[jframework15:utilities/string.php|JoomlaCode]] | ||
* {{JVer|1.5}} Subpackage [[Subpackage Utilities/1.5|Utilities]] | * {{JVer|1.5}} Subpackage [[Subpackage Utilities/1.5|Utilities]] | ||
Latest revision as of 16:05, 13 February 2013
[edit]
JString
[edit] Description
Description:JString [Edit Descripton]
[edit] Methods
| Visibility | Method name | Description |
|---|---|---|
| public | strlen | UTF-8 aware alternative to strlen Returns the number of characters in the string (NOT THE NUMBER OF BYTES),. |
| public | strtolower | UTF-8 aware alternative to strtlower Make a string lowercase Note: The concept of a characters "case" only exists is some alphabets such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does not exist in the Chinese alphabet, for example. |
| public | strtoupper | UTF-8 aware alternative to strtoupper Make a string uppercase Note: The concept of a characters "case" only exists is some alphabets such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does not exist in the Chinese alphabet, for example. |
| public | ltrim | UTF-8 aware replacement for Strip whitespace (or other characters) from the beginning of a string Note: you only need to use this if you are supplying the charlist optional arg and it contains UTF-8 characters. |
| public | rtrim | UTF-8 aware replacement for Strip whitespace (or other characters) from the end of a string Note: you only need to use this if you are supplying the charlist optional arg and it contains UTF-8 characters. |
| public | str_ireplace | UTF-8 aware alternative to str_ireplace Case-insensitive version of str_replace. |
| public | str_split | UTF-8 aware alternative to str_split Convert a string to an array. |
| public | strcasecmp | UTF-8 aware alternative to strcasecmp A case insensivite string comparison. |
| public | strcspn | UTF-8 aware alternative to strcspn Find length of initial segment not matching mask. |
| public | stristr | UTF-8 aware alternative to stristr Returns all of haystack from the first occurrence of needle to the end. |
| public | strpos | UTF-8 aware alternative to strpos Find position of first occurrence of a string. |
| public | strrev | UTF-8 aware alternative to strrev Reverse a string. |
| public | strrpos | UTF-8 aware alternative to strrpos Finds position of last occurrence of a string. |
| public | strspn | UTF-8 aware alternative to strspn Find length of initial segment matching mask. |
| public | substr | UTF-8 aware alternative to substr Return part of a string given character offset (and optionally length). |
| public | substr_replace | UTF-8 aware substr_replace Replace text within a portion of a string. |
| public | transcode | Transcode a string. |
| public | trim | UTF-8 aware replacement for Strip whitespace (or other characters) from the beginning and end of a string Note: you only need to use this if you are supplying the charlist optional arg and it contains UTF-8 characters. |
| public | ucfirst | UTF-8 aware alternative to ucfirst Make a string's first character uppercase. |
| public | ucwords | UTF-8 aware alternative to ucwords Uppercase the first character of each word in a string. |
- Defined in libraries/joomla/utilities/string.php
[edit] Importing
jimport( 'joomla.utilities.string' );
[edit] See also
-
JString on api.joomla.org
-
JString source code on JoomlaCode
-
Subpackage Utilities
- Other versions of JString
SeeAlso:JString [Edit See Also]
[edit] User contributed notes
<CodeExamplesForm />