Difference between revisions of "JString::trim"
From Joomla! Documentation
(Updated to r1448:247ba8d88526) |
m (preparing for archive only) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
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. | 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. | ||
− | + | ||
− | + | ||
− | |||
− | |||
<source lang="php"> | <source lang="php"> | ||
public static function trim ( | public static function trim ( | ||
Line 36: | Line 34: | ||
===See also=== | ===See also=== | ||
* {{JVer|11.1}} '''JString::trim source code''' on [[jplatform:utilities/string.php#cl-444|BitBucket]] | * {{JVer|11.1}} '''JString::trim source code''' on [[jplatform:utilities/string.php#cl-444|BitBucket]] | ||
− | * {{JVer|11.1}} Class [[JString | + | * {{JVer|11.1}} Class [[API17:JString|JString]] |
− | * {{JVer|11.1}} Subpackage [[Subpackage_Utilities | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage_Utilities|Utilities]] |
− | * [[JString::trim|Other versions of JString::trim]] | + | * [[API17:JString::trim|Other versions of JString::trim]] |
− | + | ||
− | + | ||
− | |||
− | |||
===User contributed notes=== | ===User contributed notes=== | ||
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JString::trim | category=JString::trim | ||
− | + | namespace=CodeExample | |
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Line 54: | Line 50: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude>[[Category: | + | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> |
Latest revision as of 22:46, 24 March 2017
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.
JString::trim[edit]
Description[edit]
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 function trim (
$str
$charlist=FALSE
)
Parameter | Type | Default | Description |
---|---|---|---|
$str | |||
$charlist | FALSE |
- Returns
- Defined on line 452 of libraries/joomla/utilities/string.php
See also[edit]
- JString::trim source code on BitBucket
- Class JString
- Subpackage Utilities
- Other versions of JString::trim
User contributed notes[edit]
Code Examples[edit]