Is there a function in Delphi equivalent to Cocoa’s stringByTrimmingCharactersInSet?
What I need is to eliminate all the characters included in a charset that are found at the beginning or the end of a string. There can be none, one or more starting or ending the string…
What would be the most efficient way to do this in Delphi?
As far i know there is not exist a RTL function like that. But you can check the
JclStringsunit part of the JCL project , which include theStrTrimCharsLeftandStrTrimCharsRightfunctions.