View Issue Details

IDProjectCategoryView StatusLast Update
0038171FPCRTLpublic2020-12-05 21:45
Reporterjamie philbrook Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version3.2.1 
Summary0038171: Feature : Enhance existing HexStr, OctStr,Bin etc, to left trim if cnt parameter is -1
DescriptionExisting 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.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

Thaddy de Koning

2020-12-05 20:07

reporter   ~0127363

Last edited: 2020-12-05 20:12

View 3 revisions

Why? Everything you ask for is in sysutils. i.e. a single unit.
example:
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?

jamie philbrook

2020-12-05 20:59

reporter   ~0127364

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.

Thaddy de Koning

2020-12-05 21:45

reporter   ~0127365

writestr is in system and that formats too.

Issue History

Date Modified Username Field Change
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