View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0038171||FPC||RTL||public||2020-12-05 16:52||2020-12-05 21:45|
|Reporter||jamie philbrook||Assigned To|
|Summary||0038171: Feature : Enhance existing HexStr, OctStr,Bin etc, to left trim if cnt parameter is -1|
|Description||Existing functions in the system.HexStr, OctStr, BinStr etc can be greatly improved if the CNT parameter would react to a -1 as a left trim.|
Currently if used you need to trim the left side which means you need to bring in other units or write local code to do so.
These features are nice because they are already there and no need to haul other bloated units for simple ready provided functions but they lack a
simple feature to help out..
Please consider enhancing the parameter to allow for a -1 for the count to trim the left side in the final results.
This should not cause any hardship in existing code.
|Tags||No tags attached.|
|Fixed in Revision|
Why? Everything you ask for is in sysutils. i.e. a single unit.
SomeInt.ToHexsr.TrimLeft or any combination of the parameterized versions of these helpers. (because this example just shows syntax and on its own is a bit of a nonsense ; ) )
Or do you mean align instead of trim?
As usual you don't get it and you would rather have people lard up their app just to please you, wouldn't you?
The functions exist in the system unit and at many times, the large hoggish sysutil isn't needed.
I run a strip down console app I want to look at what is available in the RTL first, not someone's life work of piling code on top of code that already exists Besides, with a little enhancement in the RTL, the other larded units can benefit from it by using that instead in cases where it fits to put these other larded units on a diet.
Its no big deal to left trim the string before returning. In this case I did it locally after the return of the HexStr. I Refuse to use utility units when system unit has the required code.
||writestr is in system and that formats too.|
|2020-12-05 16:52||jamie philbrook||New Issue|
|2020-12-05 20:07||Thaddy de Koning||Note Added: 0127363|
|2020-12-05 20:10||Thaddy de Koning||Note Edited: 0127363||View Revisions|
|2020-12-05 20:12||Thaddy de Koning||Note Edited: 0127363||View Revisions|
|2020-12-05 20:59||jamie philbrook||Note Added: 0127364|
|2020-12-05 21:45||Thaddy de Koning||Note Added: 0127365|