Age | Commit message (Collapse) | Author |
|
Searches for a substring in the string and replaces it with the other
string.
|
|
Instead of all these atoull() I've added everywhere.
|
|
|
|
COMMON: Add replacement to common/algorithm.h
COMMON: Intermediate commit to show doubts.
COMMON: Basic String::replace() methods implemented.
COMMON: Fix typo in the algorithm.h documentation.
COMMON: Fix documentation of String::replace()
COMMON: Fix formatting issues in method signatures.
COMMON: Add assert and reformat loops in str and algorithm.
COMMON: Fix typo in comment.
COMMON: Fix style in string test cases.
COMMON: Add Doxygen documentation to algorithm and String.
COMMON: Add Doxygen documentation to algorithm and String.
COMMON: Add Doxygen documentation to algorithm.
COMMON: Fix style in algorithm comments.
COMMON: Add Doxygen comments to String.
COMMON: Add Doxygen comments to algorithm test function.
COMMON: Add String support for substring replace.
COMMON: Fix string replace to comply with STL
COMMON: Fix documentation on string replace
COMMON: Fix style in string replace
COMMON: Fix unwanted reference problem in String::replace().
COMMON: Fix indentation in comments for replace
COMMON: Fix indentation in replace
COMMON: Fix comments in String::replace to match implementation.
COMMON: Remove assert to allow for not-null-terminated character arrays
COMMON: Add new test for String::replace
COMMON: Fix broken comments on String::replace
COMMON: Fix sharing bug on ensureCapacity
COMMON: Remove superfluous call to makeUnique()
|
|
|
|
|
|
|
|
|
|
|
|
This is done in the spirit of 658080deeda79d20ea40643569fbcb072573e7cf.
|
|
ALL: Avoid using is* macros from ctype.h
|
|
|
|
On some systems, passing signed chars to macros like isspace() etc. lead
to a runtime error. Hence, mark these macros as forbidden by default,
and introduce otherwise equivalent alternatives for them.
|
|
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results.
See http://msdn.microsoft.com/en-us/library/ms245348.aspx
|
|
|
|
There are some unit tests to verify that this works correctly.
There is a small chance that this causes regressions in weird setups.
|
|
This takes up a tiny little bit of extra binary size, but gets
rid of some awful #ifdef hackery.
|
|
|
|
This is a first step towards getting rid of all uses of regular printf,
fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase.
The name format() reflects the purpose of the function, and parallels
String.format() in Java, boost::format, and others.
svn-id: r54004
|
|
svn-id: r53586
|
|
svn-id: r53576
|
|
The return value of vsnprintf when the provided buffer is not large
enough to hold the formatted string is implementation-dependent:
C99: The size the formatted string would take up.
MSVC: -1, with no indication of how large the buffer should be.
IRIX: The number of characters actually written, which is at most
the size of the buffer minus one, as the string is truncated
to fit. This means the only way to be sure the entire string
is written is if the return value is less than the capacity - 1.
This change means that whenever we try to format a string where the size
is 1 below the built-in capacity, that the capacity will be needlessly increased.
If this turns out to be problematic we could make this behaviour __sgi conditional.
svn-id: r53143
|
|
svn-id: r52618
|
|
the global save/load menu
svn-id: r52173
|
|
If it is needed for your specific platform, then readd it,
but for that platform. Although to me it looks all redundant.
svn-id: r52155
|
|
Prior to this change lastPathComponent would not create a correct result,
when the input of lastPathComponent did not contain a single separator.
I also added a test case for this in our unit tests.
svn-id: r52123
|
|
Also make operator=(char) and String(char) behave the same.
svn-id: r50712
|
|
allocate two much memory as it was at least doubling the current capacity even when this one was sufficient.
It fixes a crash in GUI::Widget::cleanupHotkey() as the capacity of the string was doubled at each iteration once it was too long for the internal storage (only to add one character to the string). This ended up in a bad_alloc exception after a few iterations.
svn-id: r50050
|
|
This includes both an implementation and some basic unit tests for
the above mentioned functions.
svn-id: r48953
|
|
svn-id: r48281
|
|
svn-id: r47744
|
|
hackery (getting rid of certain global C++ objs)
svn-id: r46781
|
|
svn-id: r44979
|
|
svn-id: r44562
|
|
svn-id: r44520
|
|
svn-id: r44265
|
|
svn-id: r42746
|
|
svn-id: r42743
|
|
svn-id: r41337
|
|
svn-id: r41333
|
|
svn-id: r40302
|
|
new/delete instead of malloc/free
svn-id: r40291
|
|
function (via an optional 'path mode' in the latter). Also changed Archive::listMatchingMembers to use path mode when matching, just like FSDirectory::listMatchingMembers
svn-id: r38277
|
|
svn-id: r35481
|
|
overloads
svn-id: r34785
|
|
svn-id: r34718
|
|
svn-id: r34642
|
|
svn-id: r34615
|
|
that is the case, abort immediately instead of scanning the rest of the string)
svn-id: r34367
|
|
method; fixed matchString doxygen comment (it confused pattern & string); added unit tests for matchString
svn-id: r34364
|