Ilia Alshanetsky
29bf2d3a09
Fixed bug in str_word_count() when charlist if specified and "word" starts
with a character found inside the charlist.
21 years ago
Anantha Kesari H Y
384a96faf6
ext/standard/file.h NetWare LibC has fnmatch and realpath implemented.
ext/standard/syslog.c Except LOG_SYSLOG other syslog macros are supported by NetWare LibC.
ext/standard/string.c NetWare fix for dirname
-- Kamesh
21 years ago
Antony Dovgal
3baf1f7632
fix #33605 (substr_compare() crashes with negative offset & length)
21 years ago
Ilia Alshanetsky
b9575ead72
make substr_count() 30% when counting instances of 1 byte long strings.
21 years ago
Ilia Alshanetsky
67ea97dfdf
Added offset & length parameters to substr_count() function.
21 years ago
Derick Rethans
ad21bb1baa
- That should have been removed, not commented out.
21 years ago
Derick Rethans
90f4590d87
- Fixed memory corruption in stristr().
21 years ago
foobar
156a908997
- Fixed bug #33200 (preg_replace(): magic_quotes_sybase=On makes 'e' modifier misbehave)
21 years ago
Antony Dovgal
4ce95ef1ea
fix bug #33076 (str_ireplace() incorrectly counts result string length and may cause segfault)
add test
21 years ago
Ilia Alshanetsky
ca10457a58
Fixed bug #32530 (chunk_split() does not append endstr if chunklen is
longer then the original string).
22 years ago
Ilia Alshanetsky
f56e5c045c
A more performance friendly version of Andrey's patch.
22 years ago
Andrey Hristov
f15c24d44c
added an optional third parameter to str_word_count(), which is used as
a list of characters which are considerd "is_alpha()". Thus V14GR4 can
be extracted as one word if the user supplies "14" as charlist.
FR #31560
# Nuno, are you wishing to document this one too? :)
22 years ago
Andrey Hristov
1236cfa38a
- type is either 1 or 2 if second parameter is set. if not set then type
is 0.
- use the lvalue for the second rvalue
22 years ago
Marcus Boerger
df56c39bda
- Cosmetics
22 years ago
Marcus Boerger
4172ec995c
- Do not touch return_valu's refcount or is_ref
22 years ago
Anantha Kesari H Y
033a45903c
NetWare allows directory seperator as \ and /
22 years ago
Ilia Alshanetsky
1e6454a67b
Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen).
22 years ago
Antony Dovgal
39b25e4f3d
fix yet another typo
22 years ago
Antony Dovgal
d9dd604ae7
fix typo (bug #30857 )
22 years ago
Derick Rethans
59651c4e58
- Fixed bug #30630 : Added a BSD based strtod function that is
locale-independent. (PHP part)
22 years ago
Ilia Alshanetsky
0818faee7f
Slight optimization in str_split() when split length is the same or greater
then the string length.
22 years ago
Ilia Alshanetsky
2476198086
Fixed bug #30356 (str_ireplace() does not work on all strings).
22 years ago
Andi Gutmans
56f8195fe5
- Nuke empty_string. It is a reminanent from the time where RETURN_FALSE()
used to return "" and not bool(false). It's not worth keeping it because
STR_FREE() and zval_dtor() always have to check for it and it slows down
the general case. In addition, it seems that empty_string has been abused
quite a lot, and was used not only for setting zval's but generally in
PHP code instead of "", which wasn't the intention. Last but not least,
nuking empty_string should improve stability as I doubt every place
correctly checked if they are not mistakenly erealloc()'ing it or
calling efree() on it.
NOTE: Some code is probably broken. Each extension maintainer should
check and see that my changes are OK. Also, I haven't had time to touch
PECL yet. Will try and do it tomorrow.
22 years ago
Andrey Hristov
96f5c697dd
Add support for negative values of limit of explode(). If limit is negative
then all components are returned except the last abs(limit) ones.
22 years ago
Andrey Hristov
0eef82a733
fixing bug #28974 : overflow in array_slice()
The same kind of overflow appeared in array_splice(), substr() and
substr_replace()
22 years ago
Ilia Alshanetsky
5201e62d0d
Fixed bug #29034 (wordwrap() returns a boolean when passed empty string).
22 years ago
Stefan Esser
a27d5d842a
IE we love you all...
22 years ago
Stefan Esser
585628ba67
Fixed: made 3rd parameter to strrpos 64bit safe.
22 years ago
Ilia Alshanetsky
d24465ba8a
Fixed bug #28386 (wordwrap() wraps lines 1 character too soon).
23 years ago
Jay Smith
8f306fd749
Fixed a segfault. (It's possible for large offsets to make strrpos()
read past the end of the haystack string...)
23 years ago
Sara Golemon
c52cc1c333
BugFix 27675 and add regression test.
23 years ago
Dmitry Stogov
6e63ea45c7
BUG #27457 was fixed (using temporary hash table with string keys only)
23 years ago
Ard Biesheuvel
81f05c18f5
Wordsize fixes
23 years ago
Sara Golemon
ba8ad292d9
Make today's changes work w/ str_ireplace() as well.
23 years ago
Sara Golemon
1c82797664
Short circuit str_replaces when we already know that needle does not occur in haystack.
Note: Prior bugfix was for #27176 not #27276
23 years ago
Sara Golemon
5144a1f522
Bugfix #27276 : When using str_replace to expand a string, count occurances of needle in haystack to avoid massive overallocation
23 years ago
Andi Gutmans
dbeb4158d2
- A belated happy holidays and PHP 5
23 years ago
Ilia Alshanetsky
56f046a67a
Fixed ZTS build.
23 years ago
Moriyoshi Koizumi
b2cd08f33d
Fix bug #26574 (basename() doesn't work properly with multibyte characters)
23 years ago
Moriyoshi Koizumi
c4c586a652
Fix typo.
23 years ago
Sara Golemon
feee37a17a
Optimize strrpos/strripos for single char strings and fix offset to report correctly
23 years ago
Sara Golemon
3d6fcddfd2
Restore ability to use strrpos/strripos with an ordinal needle
23 years ago
Ilia Alshanetsky
5a4dda42e3
Optimize substr_replace (this makes it 3-8 times faster depending on the
string length).
23 years ago
Ilia Alshanetsky
cd482c502c
Removed dead code.
23 years ago
Ilia Alshanetsky
ab7ee13670
Added substr_compare().
23 years ago
Moriyoshi Koizumi
103b3c6626
Simplification.
23 years ago
Sara Golemon
ef7905a188
Bug Fix#25671 Corruption in subarrays in subject when using str_replace
23 years ago
Sascha Schumann
36ac7a5bb0
MFB Avoid zero-length keys which result in a spinning process
23 years ago
Sara Golemon
3560cd83c0
Squelch warning "Variable may be used uninitialized."
This would never occur anyway because of the logic of the function,
but gcc isn't quite smart enough to realize this.
23 years ago
Ilia Alshanetsky
ed40ae2650
emalloc -> safe_emalloc
23 years ago