Htmltrim: Difference between revisions From Online Manual

Jump to: navigation, search
(Created page with "{{smcfunc |function=htmltrim |usage=$smcFunc['htmltrim'] (string) |description=Works similar to the php function [http://php.net/manual/en/function.trim.php trim()], additionally...")
 
m (Bot: Automated text replacement (-  + ))
 
(4 intermediate revisions by 4 users not shown)
Line 2: Line 2:
|function=htmltrim
|function=htmltrim
|usage=$smcFunc['htmltrim'] (string)
|usage=$smcFunc['htmltrim'] (string)
|description=Works similar to the php function [http://php.net/manual/en/function.trim.php trim()], additionally also HTML spaces (e.g. <nowiki>&nbsp;</nowiki>) are trimmed.
|description=Works similar to the php function [http://php.net/manual/en/function.trim.php trim()], additionally also HTML spaces (e.g. ) are trimmed.
|parameters={{parmdesc
|parameters={{parmdesc
   |string|d1=the string that will be trimmed.
   |string|d1=the string that will be trimmed.
}}
}}
|return=the trimmed string.
|return=the trimmed string.
|example=<nowiki>$result = $smcFunc['htmltrim']('&amp;nbsp;This is the string I want to trim ');</nowiki>
|example=<nowiki>$result = $smcFunc['htmltrim'](' This is the string I want to trim ');</nowiki>
}}
}}
<noinclude>
<noinclude>
[[Category:General Utility Functions]]
[[Category:General Utility Functions]]</noinclude>
[[Category:2.0]]
[[Category:Customizing SMF]]
[[Category:Developing SMF]]</noinclude>

Latest revision as of 12:11, 1 July 2013

Usage:

$smcFunc['htmltrim'] (string)


Description: Works similar to the php function trim(), additionally also HTML spaces (e.g. ) are trimmed.

Parameters:

  • string the string that will be trimmed.

Return: the trimmed string.

Example:

$result = $smcFunc['htmltrim'](' This is the string I want to trim ');



Advertisement: