Re: String Extension Proposal
| From: | Xuefer | Date: | Sat, 02 Jul 2005 02:34:52 +0000 |
| Subject: | Re: String Extension Proposal | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-2516@lists.php.net to get a copy of this message | ||
yes
ages ago, i was suprised when i know most the oo/scripting string
didn't have a good implement even on: $string1 += $string2; they do
not modify on $string1 directly
$big_string_dst = string_function($big_string_src) is ok but..
$big_string = string_function($big_string) is a waste of space
> If a copy of the string is truly needed, then the "makeCopy()" method is
> just for that. You can do "$myStr->trim()" to do in-line trimming or
> "$trimmedStr = $myStr->makeCopy()->trim()" to preserve the original value.
but why not just call it StringBuilder? $str->build() to produce a
native php string if needed.
modify normal string in place isn't the spirit of scripting any way.
this name get it into pecl more easy imho.