Delphi RunTime Library gets enhanced with each new Delphi release, but often these improvements hide behind many flashier features. In this session, you can find out some of these fantastic RTL features.
For instance, you have this Delphi code:
[crayon-673f74df3c6f4125408770/]
As you can see this is 4 lines of code. You might have seen that in other languages there is a conditional ternary operator. Actually, you can do that thing in Delphi also! How? Here is the solution (be sure to add System.StrUtils unit):
[crayon-673f74df3c6fc894349301/]
There you go, this is so easy and efficient.
Here are some of the helpful functions:
- StartsText(const ASubText, AText: String): Boolean;
- RandomFrom(const AValues: Array of String): String;
- MatchText and MatchStr
- DupeString
Be sure to watch the webinar to learn more about these functions in action. You can learn about Parallel Programming Library also!