Ilia Alshanetsky
30c16baac2
Renamed word_count to str_word_count to comply with naming conventions.
Thanks Andi, for catching this oversight.
24 years ago
Ilia Alshanetsky
47b57f2569
Added word_count() function that allows counting of words inside a string.
The function also allows the user to retrieve all the words from a string.
24 years ago
Ilia Alshanetsky
b7917def13
Fixed bug #19865
24 years ago
Ilia Alshanetsky
a75eb9c4dd
Optimizations to various php string functions substr_count(), strrev(),
nl2br(), php_addslashes() and php_memnstr().
24 years ago
Andrey Hristov
fc46a46b06
str_shuffle() function added. Like shuffle() for arrays - however the
algorithm for creating the permutation is quite simple. More like
the implementation of shuffle() for 4.2.1 .
24 years ago
Wez Furlong
9d348ea800
Implement filter API for streams.
Filters can be stacked onto a stream; more details will follow in docs and
on php-dev.
Implement "string.rot13" filter
Allows the following script:
$fp = fopen("file.txt", "r");
stream_filter_prepend($fp, "string.rot13");
// File contents will be subject to a rot13 transformation before
// being output.
fpassthru($fp);
fclose($fp);
24 years ago
Hartmut Holzgraefe
e5fa36eee4
added money_format() function
this is similar to C-libs strfmon(), using the same format string
semantics but a different function prototype, so i decided to
give it a more speaking name similar to number_format()
24 years ago
foobar
2f8dc7a47c
- Made the trim functions use same base function. (less code :)
- Renamed php_trim2 -> php_trim (not used anyplace else, yet)
- Made php_trim abit more usable for external use. (not necessary to use
zvals with it anymore)
24 years ago
Frank M. Kromann
fd348068f4
Adding missing prototype
24 years ago
Wez Furlong
3dbde95896
Make state parameter of php_strip_tags passed by reference.
Move state tracking to stream structure.
24 years ago
Sebastian Bergmann
90613d2282
Maintain headers.
24 years ago
Sebastian Bergmann
38933514e1
Update headers.
24 years ago
Jeroen van Wolffelaar
f61dfce39c
Make chop the alias and rtrim the main function, in order to get automagically
generated alias-listings correct.
25 years ago
Derick Rethans
61d4f7fe65
- Really fix nl2br now... it's actaulyl faster now
25 years ago
Sterling Hughes
536c96969b
update php_trim as well...
25 years ago
Sterling Hughes
c661449ebf
fix crash bug
25 years ago
Zeev Suraski
c0404f4631
Whitespace
25 years ago
Andrei Zmievski
c4555f9f55
@- Added vprintf() and vsprintf() functions that allow passing all arguments
25 years ago
Sascha Schumann
23b9300fd1
more tsrm cleanup
25 years ago
Sebastian Bergmann
b4f31ecef5
Fix ZTS build.
25 years ago
Jeroen van Wolffelaar
2e6850a91d
Added proto for php_charmask in the .h
25 years ago
Sebastian Bergmann
ea79632b29
Fix Win32 (and maybe other ZTS) builds.
25 years ago
Jeroen van Wolffelaar
f0bcaf3901
Un-revert patch
25 years ago
Jeroen van Wolffelaar
f6979a7d2b
Reverting last patch, segfaults.
25 years ago
Jeroen van Wolffelaar
c2150f7038
- Added new parameter to [l|r]trim, to specify _what_ to trim
@- Added optional second parameter to trim, chop and ltrim. You can
@ now specify which characters to trim (jeroen)
25 years ago
Sascha Schumann
09ce807bf1
Drop memchr() in php_memnstr in favor of manual scanning. This reduces
the complexity of the function and is about 20% faster on Linux/x86.
25 years ago
Wez Furlong
f1364ebf3e
(PHP nl_langinfo) Added function when provided by OS
(PHP htmlentities, htmlspecialchars) Uses nl_langinfo to determine charset
@- Added nl_langinfo() (when OS provides it) that returns locale
information. (Wez Furlong)
# There are a lot of constants used by nl_langinfo; should we do something
# along the lines of what we do for syslog?
25 years ago
Hartmut Holzgraefe
045acafc52
@added optional suffix removal parameter to basename() (Hartmut)
added optional suffix removal parameter to basename()
this makes it more simmilar to the basename command
25 years ago
Stephen van Egmond
3b8140e47c
fixed a (C++) warning about implicit conversion from void*
25 years ago
Andi Gutmans
eb6ba01d1c
- Fix copyright notices with 2001
25 years ago
Sean Bright
457888ac44
Put these back where they belong. They weren't necessary unless ZTS and
HAVE_LOCALECONV were both defined.
25 years ago
Sean Bright
a588d65591
Added string comparison function strcoll(). It uses the current locale to
do the comparisons.
@- Added localeconv() and strcoll() functions for localization. (Sean)
25 years ago
Zeev Suraski
0592feb2a1
Nuke a couple of warnings
25 years ago
Sean Bright
40f3524247
Added localeconv() function. Operates similarly to localeconv() defined in
25 years ago
Rui Hirokawa
0afcb03de3
added iconv extension.
25 years ago
Rui Hirokawa
6368933118
added iconv_set_encoding() to change the encoding setting.
25 years ago
Rui Hirokawa
517b81ad43
added a output handler function ob_iconv_handler which tranforms output encoding using iconv().
25 years ago
Stig Bakken
6e1e78d1c6
@Added iconv() function (using libc or libiconv) (Stig)
25 years ago
Sascha Schumann
1cc3e6b5e6
Move php_memnstr to the header file, so that the function body is available
in all compilation units (note the static linkage).
26 years ago
Sterling Hughes
0b9a78cb1e
@- Added the pathinfo() function. (Sterling)
26 years ago
David Croft
83513d9580
Changed lots of PHP 3 licence headers to PHP 4, mainly in .h files.
Added a few RCS $Id$ tags.
# Note: I have avoided changing any .h files if the corresponding .c file
# had not already been changed as I am not sure if there are any legal
# issues here. So some extensions still have PHP 3 headers.
26 years ago
David Croft
8dd1fdb1a0
wordwrap function from Chris Russel <russel@yorku.ca>
differences from his patch:
- wordwrap width and wrap-string now optional parameters
(default to 75 and "\n" respectively)
- wordwrap_byte is now just an automatic special case of wordwrap
- Zend API compliant
@- Added new function "wordwrap" to wordwrap long strings from Chris
@ Russel <russel@yorku.ca> (David Croft)
26 years ago
Andrei Zmievski
885e40db05
@- Updated str_pad() to be able to pad on left/right/both sides. (Andrei)
26 years ago
Sascha Schumann
cd754d7825
Rename macros which begin with underscore to appropiate macros. The general
rule is:
macro_name=`echo $filename|tr a-z A-Z|sed 's/\./_/'`
26 years ago
Andrei Zmievski
b928bdceb8
@- Added str_pad() for padding a string with an arbitrary string on left or
26 years ago
Clayton Collie
0b7fd17c2b
Added sscanf() function.
26 years ago
Hartmut Holzgraefe
e191baa1a3
php_basename() prototype changed according to latest changes in string.c
26 years ago
Rasmus Lerdorf
7182e722ca
Need a PHPAPI version of basename for some stuff I am working on.
Also fixed a bug along the way in the basename function. If it
was fed something like "filename.ext/////" it would return the string
with all the slashes whereas if you fed it "/path/filename.ext////" it
would get it right.
@ Fixed basename() bug where "file.ext///" would not return the same
@ as "/path/file.ext///" (Rasmus)
26 years ago
Hartmut Holzgraefe
4571d8ddea
name changed from levdist() to levenshtein()
(although i bet we'll get a levenstein() alias some day)
26 years ago
Hartmut Holzgraefe
0eb51100b7
added function "int levdist(string str1, string str2)"
that will calculate the Levenshtein distance between two
strings (faster and possibly more accurate than similar_text())
26 years ago