Ivan Fefer
23d733be95
Add: Basic autocompletion on tab for console commands ( #12163 )
3 months ago
Patric Stout
75f21065c9
Codechange: refactor DecodeHexText to a generic purpose ConvertHexToBytes ( #11866 )
...
DecodeHexText() does more than just decoding hex. ConvertHexToBytes()
now only does pure hex decoding. This required a bit of refactoring
for the code using DecodeHexText().
4 months ago
Rubidium
2d77cf9c80
Codechange: replace StrStartsWith/StrEndsWith with starts_with and ends_with
5 months ago
Patric Stout
fd073a2810
Remove: replace custom span with std::span
5 months ago
Rubidium
3a676a5af0
Codechange: replace static inline with static for non-class functions
5 months ago
Michael Lutz
86e28e79fb
Fix #11402 : Make string filter locale-aware.
7 months ago
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
11 months ago
Rubidium
e04d43f396
Remove: now unused stredup
11 months ago
Rubidium
48dcb79145
Cleanup: remove seprintf and vsnprintf
12 months ago
Rubidium
97dd84d1e0
Codechange: move saveload string fixing code to saveload
12 months ago
Rubidium
e762855201
Cleanup: remove str_strip_colours; StrMakeValid also removes the colours
...
Essentially str_strip_colours followed by StrMakeValid makes the calling of
str_strip_colours useless, as StrMakeValid would have removed them too.
12 months ago
Rubidium
4ca23a19b6
Cleanup: char-pointer variant of strtolower
12 months ago
Rubidium
ce8933d63e
Add: std::back_insert_iterator<std::string> Utf8Encode function
1 year ago
Rubidium
6a519f5d89
Cleanup: strecat has no uses anymore
1 year ago
Rubidium
acec34a0fe
Cleanup: remove MD5SumToString in lieu of FormatArrayAsHex
1 year ago
Rubidium
d9a04ba446
Codechange: make the MD5 hash/digest/checksum variables a std::array
1 year ago
Peter Nelson
83f2ad500e
Codechange: stdarg.h include not needed as cstdarg is included.
1 year ago
Rubidium
f1fb6c95fe
Add: case insensitive string comparator
1 year ago
Patric Stout
febe394806
Codechange: replace C-style strings with C++-style strings in textfile ( #10772 )
1 year ago
Rubidium
a312a6c1b2
Codechange: make md5sumToString std::string compatible
1 year ago
Rubidium
c829930440
Codechange: replace strnatcmp with C++ string capable version
1 year ago
Rubidium
4dd5f994be
Codechange: replace strncasecmp with case ignoring variant of StrStarts/EndsWith
1 year ago
Rubidium
86786a7af6
Codechange: introduce StrEqualsIgnoreCase/StrCompareIgnoreCase to replace strcasecmp
1 year ago
Rubidium
9fe853f7b5
Codechange: use fmt::format instead of vseprintf for midi command formatting
1 year ago
Rubidium
c8ff6a9f7c
Codechange: replace str_fmt with std::string constructs
1 year ago
Michael Lutz
a05fd7aa50
Change: [Network] Transfer command data as serialized byte stream without fixed structure.
...
The data will be transmitted as the length followed by the serialized data. This allows the command
data to be different for every command type in the future.
2 years ago
rubidium42
fed3e3305f
Codechange: add function to determine whether are string starts or ends with a given other string
3 years ago
rubidium42
b4aedef848
Codechange: add std::string variant of Utf8StringLength
3 years ago
Patric Stout
7713c3e3cc
Codechange: move casting a "const char *" to "char *" to the caller
...
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.
3 years ago
Patric Stout
ca9a7df752
Codechange: rename str_validate to StrMakeValid(InPlace) ( #9304 )
...
This to be more explicit the function changes the value, and not
returns yes/no.
3 years ago
rubidium42
16437b7c0d
Codechange: move client name in settings to std::string
3 years ago
rubidium42
dc05917287
Add: [[nodiscard]] to std::string str_validate
3 years ago
Milek7
8e9eca6ddd
Codechange: Use __attribute__ access none to silence GCC 11 -Wmaybe-uninitialized warnings ( #9124 )
3 years ago
rubidium42
5202869f0f
Add: String functionality to trim spaces from C-style strings
3 years ago
Patric Stout
fda1fbf61c
Revert c1fddb9
, 639cfa4: "Codechange: Check if access __attribute__ is supported before trying to use it." ( #8526 )
...
This reverts commit c1fddb9a6a
and 639cfa43d2
.
access_mode "none" is only supported by GCC11, but introduced
after it branched. So there are GCC11.0s out there that do not
support it. We will have to wait for GCC11.1 to hit before we
can re-add this.
3 years ago
milek7
639cfa43d2
Codechange: Use access __attribute__ to silence warnings in GCC
3 years ago
Michael Lutz
0c6e8a8123
Codechange: Store file search paths as std::string.
3 years ago
Charles Pigott
64b1c70fdd
Codechange: Add WARN_FORMAT to vseprintf and fix the cascade of warnings that followed
4 years ago
Michael Lutz
715aa67a9c
Codechange: Use std::string in INI file parsing.
4 years ago
Michael Lutz
c082f570ce
Codechange: Use std::string when translating TTDP NewGRF string codes.
4 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
5 years ago
frosch
08eeec15be
(svn r26513) -Fix: 9x compilation, maybe
10 years ago
rubidium
db8d208bfc
(svn r26507) -Cleanup: remove now unused custom strndup implementation
10 years ago
rubidium
e61fe21237
(svn r26506) -Codechange: replace most of vsnprintf with vseprintf
10 years ago
rubidium
382ca0941f
(svn r26498) -Add: method for duplicating strings with similar behaviours as strecpy and strecat; give end pointer instead of a size
10 years ago
frosch
ef4c2ce031
(svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy and strecat.
10 years ago
michi_cc
76367f6bf1
(svn r25653) -Add: Caret movement by words for CJK languages.
11 years ago
michi_cc
e7dc14b25a
(svn r25652) -Fix: Improve text caret movement for complex scripts.
11 years ago
rubidium
4c443bce5c
(svn r25555) -Fix [FS#5632]: [Script] Texts from scripts were not validated before they were shown, causing an assertion to trigger
11 years ago