summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib
Commit message (Collapse)AuthorAgeFilesLines
* Corrected assert to check for correct type in py3k.Eric Smith2008-02-241-1/+1
|
* Now that PyOS_ascii_formatd supports the 'n' format, simplify the float ↵Eric Smith2008-02-201-40/+15
| | | | formatting code to just call it.
* Added code to correct combining str and unicode in ''.format(). Added test ↵Eric Smith2008-02-181-0/+16
| | | | case.
* Backport of PEP 3101, Advanced String Formatting, from py3k.Eric Smith2008-02-174-0/+2273
| | | | | | | | | | | | | | | Highlights: - Adding PyObject_Format. - Adding string.Format class. - Adding __format__ for str, unicode, int, long, float, datetime. - Adding builtin format. - Adding ''.format and u''.format. - str/unicode fixups for formatters. The files in Objects/stringlib that implement PEP 3101 (stringdefs.h, unicodedefs.h, formatter.h, string_format.h) are identical in trunk and py3k. Any changes from here on should be made to trunk, and changes will propogate to py3k).
* Made _ParseTupleFinds only defined to unicodeobject.cFacundo Batista2007-11-161-0/+3
|
* Fix for stupid error (I need to remember to do a full 'make clean + make'Facundo Batista2007-11-161-1/+1
| | | | cycle before the tests...). Sorry.
* Now in find, rfind, index, and rindex, you can use None as defaults,Facundo Batista2007-11-161-0/+47
| | | | | | | | | | | | as usual with slicing (both with str and unicode strings). This fixes issue 1259. For str only the stringobject.c file was modified. But for unicode, I needed to repeat in the four functions a lot of code, so created a new function that does part of the job for them (and placed it in find.h, following a suggestion of Barry). Also added tests for this behaviour.
* Fix endcase for str.rpartition()Raymond Hettinger2006-09-041-4/+4
|
* changed count to return 0 for slices outside the source stringFredrik Lundh2006-05-301-1/+1
|
* changed find/rfind to return -1 for matches outside the source stringFredrik Lundh2006-05-301-10/+11
|
* fixed "abc".count("", 100) == -96 error (hopefully, nobody's relying onFredrik Lundh2006-05-291-1/+4
| | | | the current behaviour ;-)
* needforspeed: stringlib refactoring: changed find_obj to find_slice,Fredrik Lundh2006-05-271-18/+39
| | | | to enable use from stringobject
* needforspeed: replace improvements, changed to Py_LOCAL_INLINEFredrik Lundh2006-05-274-9/+9
| | | | where appropriate
* needforspeed: more stringlib refactoringFredrik Lundh2006-05-272-0/+62
|
* Fix Coverity warnings.Neal Norwitz2006-05-271-6/+1
| | | | | - Check the correct variable (str_obj, not str) for NULL - sep_len was already verified it wasn't 0
* needforspeed: stringlib refactoring: use stringlib/find for string findFredrik Lundh2006-05-261-6/+15
|
* needforspeed: stringlib refactoring, continued. added count andFredrik Lundh2006-05-263-4/+95
| | | | find helpers; updated unicodeobject to use stringlib_count
* needforspeed: added rpartition implementationFredrik Lundh2006-05-262-1/+68
|
* removed unnecessary includeFredrik Lundh2006-05-261-2/+0
|
* needforspeed: stringlib refactoring (in progress)Fredrik Lundh2006-05-261-0/+50
|
* needforspeed: stringlib refactoring (in progress)Fredrik Lundh2006-05-262-0/+102