summaryrefslogtreecommitdiff
path: root/src/string
AgeCommit message (Collapse)AuthorFilesLines
2012-08-11memcpy asm for i386 and x86_64Rich Felker2-0/+51
2012-08-11remove unused but buggy code from strstr.cRich Felker1-10/+0
2012-08-11remove buggy short-string wcsstr implementation; always use twowayRich Felker1-9/+0
since this interface is rarely used, it's probably best to lean towards keeping code size down anyway. one-character needles will still be found immediately by the initial wcschr call anyway.
2012-07-31optimize mempcpy to minimize need for data saved across the callRich Felker1-2/+1
2012-06-20make strerror_r behave nicer on failureRich Felker1-2/+8
if the buffer is too short, at least return a partial string. this is helpful if the caller is lazy and does not check for failure. care is taken to avoid writing anything if the buffer length is zero, and to always null-terminate when the buffer length is non-zero.
2012-05-26fix overrun (n essentially ignored) in wcsncmpRich Felker1-1/+1
bug report and solution by Richard Pennington
2012-05-26fix failure of strrchr(str, 0)Rich Felker1-1/+1
bug report and solution by Richard Pennington
2012-03-01add all missing wchar functions except floating point parsersRich Felker9-0/+71
these are mostly untested and adapted directly from corresponding byte string functions and similar.
2011-09-11add dummied strverscmp (obnoxious GNU function)Rich Felker1-0/+7
programs that use this tend to horribly botch international text support, so it's questionable whether we want to support it even in the long term... for now, it's just a dummy that calls strcmp.
2011-06-13fix wrong type for wcsrchr argument 2Rich Felker1-1/+1
2011-05-22fix strncat and wcsncat (double null termination)Rich Felker3-3/+3
also modify wcsncpy to use the same loop logic
2011-05-22fix wcsncpy writing past end of bufferRich Felker1-1/+1
2011-04-26function signature fix: add const qualifier to mempcpy src argRich Felker1-1/+1
2011-04-13implement memrchr (nonstandard) and optimize strrchr in terms of itRich Felker2-4/+15
2011-04-07fix misplaced *'s in string functions (harmless)Rich Felker3-3/+3
2011-04-06fix prototype for strsepRich Felker1-0/+1
2011-04-05fix misaligned read on early string termination in strchrRich Felker1-1/+2
this could actually cause rare crashes in the case where a short string is located at the end of a page and the following page is not readable, and in fact this was seen in gcc compiling certain files.
2011-04-03fix serious bug in strchr - char signednessRich Felker1-9/+11
search for bytes with high bit set was giving (potentially dangerous) wrong results. i've tested, cleaned up, and hopefully sped up this function now.
2011-03-25fix all implicit conversion between signed/unsigned pointersRich Felker6-20/+16
sadly the C language does not specify any such implicit conversion, so this is not a matter of just fixing warnings (as gcc treats it) but actual errors. i would like to revisit a number of these changes and possibly revise the types used to reduce the number of casts required.
2011-03-17fix broken wmemchr (unbounded search)Rich Felker1-1/+1
2011-02-26fix missing prototype for strsignalRich Felker1-0/+1
2011-02-24add implementation of memccpy functionRich Felker1-0/+32
2011-02-24fix backwards conditional in stpncpyRich Felker1-1/+1
this only made the function unnecessarily slow on systems with unaligned access, but would of course crash on systems that can't do unaligned accesses (none of which have ports yet).
2011-02-14more header cleanup and conformance fixes - string.hRich Felker1-0/+1
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker60-0/+1054