Commit Graph

187 Commits

Author SHA1 Message Date
Michael VAN CANNEYT
1ee1040bce * Explicit string types, duplicate where needed 2023-07-14 20:16:27 +02:00
Michael VAN CANNEYT
4336599c3a * Char -> AnsiChar 2023-07-14 17:26:10 +02:00
marcoonthegit
8e7572faba * small cleanup, remove redundant result assignment and unused variable (from Lagprogramming on forum) 2023-04-11 14:13:39 +02:00
Michael Van Canneyt
6ff542a13e * SafeFormat and helper function to convert array of const to string in a safe manner 2023-03-31 22:13:05 +02:00
Sven/Sarah Barth
862cffa087 * have the unsigned 32-bit overload of IntToHex use the signed 32-bit one to avoid usage of 64-bit arithmetic (and parameter passing) when it can be avoided 2022-04-19 14:24:01 +02:00
Sven/Sarah Barth
d32134dd1a * fix #39664: ensure that the 8- and 16-bit signed overloads of IntToHex return the correct number of digits
+ added test
2022-04-19 14:24:00 +02:00
florian
0764158fd1 * reverted TryStrToInt to the old implementation since after the val fixed the changes are not
needed anymore as pointed out by Bart B
2022-01-09 18:35:31 +01:00
florian
983fbff871 * proper range checking for TryStrToDWord, should resolve all issues in #39406 2022-01-02 21:46:14 +01:00
florian
435f3a9fe2 * allow a range of Low(Longint) to High(DWord) in TryStrToInt, see also issue #39406
* moved test
2022-01-02 21:33:01 +01:00
Michaël Van Canneyt
b1412ec5c0 * Make hexdigits a global constant 2021-11-30 09:06:41 +01:00
florian
40df955423 * StrTo* functions are now using the TryStrTo* functions 2021-11-01 14:55:41 +01:00
Michaël Van Canneyt
1e74c418ae * Fix integer overflow not being detected. Issue #39406 2021-10-17 12:44:44 +02:00
Károly Balogh
45b5e9215c rtl: remove defines for v2.x compiler from the common part of the RTL. It's no longer suppported to build with that
git-svn-id: trunk@49036 -
2021-03-23 09:32:49 +00:00
ondrej
de6f3ea9b5 * rename generic TStringBuilder to TGenericStringBuilder to make code tools happy
git-svn-id: trunk@47553 -
2020-11-24 09:43:46 +00:00
ondrej
bbdf1b5d27 SysUtils: SInvalidDateTime <> SInvalidDateTimeFloat
git-svn-id: trunk@46747 -
2020-09-02 09:58:12 +00:00
svenbarth
f0e8d5dfa6 * fix for Mantis #37043: apply patch by Bi0T1N (including test) to add additional overloads for IntToHex including a rerouting of the ordinal helpers' ToHexString to use these overloads
git-svn-id: trunk@45370 -
2020-05-15 15:14:19 +00:00
michael
50261464da * Patch from N. Neumann, implement some delphi compatible StrToUint functions (bug id 37049)
git-svn-id: trunk@45336 -
2020-05-11 13:14:47 +00:00
florian
f1eccca3a6 * catch exceptions in all variants of TextToFloat properly
* force x87 exceptions to be thrown on all platforms using x87

git-svn-id: trunk@44070 -
2020-01-30 21:23:10 +00:00
michael
3fcc1c5f0e * Complete the implementation of IsLeadChar
git-svn-id: trunk@41336 -
2019-02-16 10:50:31 +00:00
michael
a750039f7c * Add overloaded version of stringreplace with replacement count (ID 23987)
git-svn-id: trunk@41330 -
2019-02-16 07:55:26 +00:00
michael
93ec37a4bc Added overloads UintToStr for Delphi compatbibility (bug ID 0034690)
git-svn-id: trunk@40529 -
2018-12-12 08:29:24 +00:00
nickysn
5409450195 + ported and enabled compilation of unit sysutils for win16
git-svn-id: trunk@37734 -
2017-12-15 16:58:49 +00:00
michael
32cdee6f5d * Fix bugs 30950 & 29781
git-svn-id: trunk@36740 -
2017-07-17 16:24:05 +00:00
marcus
824cabd203 Fixed textractquote regression after r35598
git-svn-id: trunk@35604 -
2017-03-16 08:04:38 +00:00
michael
e2d704cc8d * Small optimization in CompareStr as suggested in bug ID #30777
git-svn-id: trunk@35601 -
2017-03-15 21:30:19 +00:00
michael
0ee31963ed * explicit check for Nil in AnsiExtractQuotedString (bug 31212)
git-svn-id: trunk@35598 -
2017-03-15 18:05:39 +00:00
michael
b5fb706a65 * Fix bug #31176: (Try)StrToBool should accept localized floats
git-svn-id: trunk@35331 -
2017-01-25 21:23:07 +00:00
marco
e6029140eb * fix for #31073
git-svn-id: trunk@35203 -
2016-12-27 16:31:14 +00:00
michael
3e21810dbd * Change comments for AdjustLineBreaks (bug ID 30959)
git-svn-id: trunk@34969 -
2016-11-26 17:05:54 +00:00
svenbarth
63f0c7a2c3 Fix for Mantis #30734: Implement Delphi-compatible functions StrToUInt64(), StrToUInt64Def and TryStrToUInt64 as inline forwarders to the existing respective QWord functions
git-svn-id: trunk@34710 -
2016-10-13 17:49:50 +00:00
michael
5810ff8154 * Patch from Maciej Izak for delphi compatible TLocaleOptions (bug ID 30660)
git-svn-id: trunk@34683 -
2016-10-08 22:23:34 +00:00
michael
f4e3068c8b * AnsiExtractquotedStr returns original string if unquoted
git-svn-id: trunk@34495 -
2016-09-10 18:51:02 +00:00
michael
5917b38706 * AnsiDequotedString needs to return empty if it equals "" (bug ID 30220)
git-svn-id: trunk@34494 -
2016-09-10 18:43:59 +00:00
michael
a5d38c7ba6 * Added TStringBuilder
git-svn-id: trunk@33695 -
2016-05-16 15:23:40 +00:00
michael
f380aeb63d * Fix from Andrea Mauri to make formatfloat delphi-compatible in case of negative zero (bug ID 26465)
git-svn-id: trunk@33344 -
2016-03-27 10:40:09 +00:00
michael
bcdfe055a8 * Fix bug ID #26944 (thousandseparator, patch from wp)
git-svn-id: trunk@33343 -
2016-03-27 10:13:16 +00:00
michael
2ec2f1fc16 * Fix bug in WrapText (bug ID 26677)
git-svn-id: trunk@33342 -
2016-03-27 09:41:23 +00:00
michael
2b077f6af3 * Revert Integer -> SizeInt change where appropriate, capping result when needed
git-svn-id: trunk@33327 -
2016-03-26 07:41:34 +00:00
michael
416151a335 * Adapted string routines so they use sizeint instead of integer (bug ID 29814)
git-svn-id: trunk@33246 -
2016-03-13 18:59:21 +00:00
michael
671416959d * Added SameStr, for symmetry and consistency with SameText (bug ID 29821)
git-svn-id: trunk@33238 -
2016-03-13 16:31:41 +00:00
florian
8b81ce7e25 * use PtrUInt instead of Cardinal in GenericAnsiStrLComp and GenericAnsiStrLIComp, resolves #29815
git-svn-id: trunk@33218 -
2016-03-11 20:38:48 +00:00
michael
5568ee5513 * Bug ID #29779, add DWord versions of StrToInt
git-svn-id: trunk@33153 -
2016-03-05 13:50:59 +00:00
michael
cf530f117e * Faster stringreplace (bug ID 26864)
git-svn-id: trunk@33055 -
2016-02-06 10:19:56 +00:00
michael
8544b8a500 * Patch from Anthony Walter to make IsValidIdent more strict in case of dotted identifiers (bug ID 29364)
git-svn-id: trunk@32920 -
2016-01-10 22:57:19 +00:00
michael
244be4f4c2 * Added UnicodeStringReplace WideStringReplace (bug ID 28396)
git-svn-id: trunk@32815 -
2015-12-31 16:09:05 +00:00
michael
67d0cd1770 * Fix bug #29273 (extra argument for IsValidIdent)
git-svn-id: trunk@32791 -
2015-12-29 16:55:00 +00:00
yury
e1a0b1204a * Removed unused vars in RTL.
git-svn-id: trunk@31750 -
2015-09-17 16:48:53 +00:00
Jonas Maebe
2afd8eb802 - removed FPC_HAS_STR_CURRENCY-related code, FPC 2.6.4 has it
git-svn-id: trunk@31692 -
2015-09-15 11:51:48 +00:00
florian
4d5f1f04fe * solution in r29126 was brute force, fixed
git-svn-id: trunk@29128 -
2014-11-23 20:37:20 +00:00
florian
9a31cba3d3 * do not blindly insert decimal seperators in StrToFloat, resolves #27029
git-svn-id: trunk@29126 -
2014-11-23 20:18:19 +00:00