Actions

API17

JString

From Joomla! Documentation

Revision as of 21:08, 10 May 2013 by JoomlaWikiBot (Talk | contribs)

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

Description

Description:JString [Edit Descripton]

Methods

Visibility Method name Description
public static compliant Tests whether a string complies as UTF-8.
public static 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 static parse_url Does a UTF-8 safe version of PHP parse_url function.
public static 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 static str_ireplace UTF-8 aware alternative to str_ireplace Case-insensitive version of str_replace.
public static str_split UTF-8 aware alternative to str_split Convert a string to an array.
public static strcasecmp UTF-8/LOCALE aware alternative to strcasecmp A case insensivite string comparison.
public static strcmp UTF-8/LOCALE aware alternative to strcmp A case sensitive string comparison.
public static strcspn UTF-8 aware alternative to strcspn Find length of initial segment not matching mask.
public static stristr UTF-8 aware alternative to stristr Returns all of haystack from the first occurrence of needle to the end.
public static strlen UTF-8 aware alternative to strlen Returns the number of characters in the string (NOT THE NUMBER OF BYTES),.
public static strpos UTF-8 aware alternative to strpos Find position of first occurrence of a string.
public static strrev UTF-8 aware alternative to strrev Reverse a string.
public static strrpos UTF-8 aware alternative to strrpos Finds position of last occurrence of a string.
public static strspn UTF-8 aware alternative to strspn Find length of initial segment matching mask.
public static 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 static 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 static substr UTF-8 aware alternative to substr Return part of a string given character offset (and optionally length).
public static substr_replace UTF-8 aware substr_replace Replace text within a portion of a string.
public static transcode Transcode a string.
public static 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 static ucfirst UTF-8 aware alternative to ucfirst Make a string's first character uppercase.
public static ucwords UTF-8 aware alternative to ucwords Uppercase the first character of each word in a string.
public static valid Tests a string as to whether it's valid UTF-8 and supported by the Unicode standard Note: this function has been modified to simple return true or false.
  • Defined in libraries/joomla/utilities/string.php

Importing

jimport( 'joomla.utilities.string' );

See also

SeeAlso:JString [Edit See Also]

User contributed notes

<CodeExamplesForm />