Page 1 of 1

string.format() patch2 + bugfix

Posted: Fri Jun 26, 2015 5:21 am
by andenixa
* Now actually faster than string concatenation in eScript
* Fixes a bug where {:d} formating could cause an arbitrary number shown instead of a real value
* tag errors are slightly more intuitive and compact.

Re: string.format() patch2 + bugfix

Posted: Sat Jul 11, 2015 4:01 am
by Turley
THX for your contribution.
But your position variables are not compatible with 64bit. Since you declare them as unsigned int which is to small on 64bit systems to compare against string::npos. You should use size_t that works on every platform.
By the way do you know boost::string_ref? That would remove all the temporary string copies and speed it up further.

Re: string.format() patch2 + bugfix

Posted: Sun Jul 19, 2015 4:01 am
by andenixa
Not much into BOOST yet, but I study it.
The thing is that you have to incorporate the patch somehow.
The previous version has a bug.

I shall use your suggestion about size_t for the next submissions.
I don't even have 64bit version thus these things happen.