summaryrefslogtreecommitdiff
path: root/src/string.cpp
AgeCommit message (Collapse)Author
2021-06-13Codechange: add function to determine whether are string starts or ends with ↵rubidium42
a given other string
2021-05-29Codechange: add std::string variant of Utf8StringLengthrubidium42
2021-05-29Codechange: move casting a "const char *" to "char *" to the callerPatric Stout
It is not nice to have your definition say you won't change a value while in fact the whole reason for your existance is to change it.
2021-05-29Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)Patric Stout
This to be more explicit the function changes the value, and not returns yes/no.
2021-05-13Codechange: move client name in settings to std::stringrubidium42
2021-04-29Fix: String validation could leave invalid Utf8 encoded strings (#9096)rubidium42
In case a character was encoded in multiple bytes, but required fewer bytes to be encoded, the first byte would be copied to the output leaving an invalid Utf8 encoded string. Later uses of the validated string would use the same decode logic, which would yield a question mark and just read a single byte, so nothing dangerous happened. Furthermore, because the next byte would not be a first byte of an encoded Utf8 character, the last few valid characters could be removed by the validation as well.
2021-04-24Add: String functionality to trim spaces from C-style stringsrubidium42
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2020-12-27Codechange: Use automatic memory management for language pack reading.Michael Lutz
2020-12-27Codechange: Store file search paths as std::string.Michael Lutz
2020-06-05Fix: unbreak building with ICU on macOSMarcus Calhoun-Lopez
A symbol clash breaks building ICU on macOS, and although it isn't necessary, it might as well be possible.
2020-05-21Codechange: Use std::string in INI file parsing.Michael Lutz
2020-05-21Codechange: Use std::string when translating TTDP NewGRF string codes.Michael Lutz
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-04-09Codechange: Use override specifier for text layout classes.Michael Lutz
2019-03-26Codechange: Removed SmallVector completelyHenry Wilson
2019-03-26Codechange: Replaced SmallVector::[Begin|End]() with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Append() with ↵Henry Wilson
std::vector::[push|emplace]_back()
2019-03-26Codechange: Replace SmallVector::Length() with std::vector::size()Henry Wilson
2019-03-26Codechange: Replace SmallVector::Clear() with std::vector::clear()Henry Wilson
2019-03-11Codechange: ICU_SORT is in reality ICU_I18N (according to their CMake files)Patric Stout
By naming it in a different way, things get a bit confusing. Especially if we are switching to CMake, which autodetects these things, we need to use the name the authors of ICU gave it; not our interpertation of that name.
2018-12-27Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined ↵glx
macro _WIN32
2018-12-08Add: [OSX] Native text caret handling.Michael Lutz
2018-12-08Add: [OSX] Native natural sort implementation.Michael Lutz
2018-10-31Remove: A few bits of dead codeCharles Pigott
2018-10-31Fix: Remove various dead or unnecessary assignmentsCharles Pigott
2018-06-06Change: [Win32] Use Uniscribe instead of ICU for text caret handling.Michael Lutz
This removes the need for the ICU lib on Windows.
2018-06-06Add: [Win32] Native natural sort implementation.Michael Lutz
2015-08-10(svn r27380) -Fix: [Win32] Compilation with MSVC2015.michi_cc
2015-08-09(svn r27377) -Codechange: use the pkg-config files of ICU as well. Since ↵rubidium
they are split into separate libraries it becomes possible to split RTL support for natural sorting, although the effect will be minimal
2015-08-09(svn r27367) -Codechange: make a distinction between the layouting part of ↵rubidium
ICU (lx) or the sorting/collation part of ICU (i18n)
2014-10-15(svn r27020) -Cleanup: some coding style consistency improvements (mostly ↵rubidium
spaces)
2014-04-25(svn r26507) -Cleanup: remove now unused custom strndup implementationrubidium
2014-04-24(svn r26506) -Codechange: replace most of vsnprintf with vseprintfrubidium
2014-04-24(svn r26500) -Cleanup: remove unused snprintf implementationrubidium
2014-04-24(svn r26498) -Add: method for duplicating strings with similar behaviours as ↵rubidium
strecpy and strecat; give end pointer instead of a size
2014-04-23(svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy ↵frosch
and strecat.
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-04-20(svn r26472) -Cleanup: pointless instance variablerubidium
2014-03-01(svn r26384) -Fix [FS#5924]: Return correct values from ICU iterators in ↵fonsinchen
case of leading or trailing whitespace
2013-11-26(svn r26124) -Fix: make sure all members of the default string iterator are ↵rubidium
initialised
2013-11-08(svn r25952) -Fix [FS#5719]: do not skip numbers when skipping spaces and ↵rubidium
other sorting 'improving' characters
2013-08-05(svn r25653) -Add: Caret movement by words for CJK languages.michi_cc
2013-08-05(svn r25652) -Fix: Improve text caret movement for complex scripts.michi_cc
2013-07-04(svn r25555) -Fix [FS#5632]: [Script] Texts from scripts were not validated ↵rubidium
before they were shown, causing an assertion to trigger
2013-06-30(svn r25527) -Fix[FS#5621]: strndup should not examine strings beyond its ↵alberth
upper limit.
2013-06-24(svn r25454) -Remove/Fix/Cleanup: SETX(Y) does not work at all with other ↵rubidium
than default fonts, so get rid of it
2013-02-09(svn r24983) -Change: Apply the same name sorting rules to content and ↵frosch
NewGRF list as for the server list.
2013-01-08(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by ↵planetmaker
Eagle_rainbow)