Delphi XE2 Foundations

Home

About the author

Editions

Errata

FAQ

Feedback

Screenshots

Table of contents Chapter 1 – Language basics Chapter 2 – Simple types: enumerations, numbers and date/times Chapter 3 – OOP fundamentals Chapter 4 – Going further with classes and records Chapter 5 – String handling Chapter 6 – Arrays, collections and enumerators Chapter 7 – Basic I/O: writing console applications and working with the file system Chapter 8 – Advanced I/O: streams Chapter 9 – ZIP, XML, Registry and INI file support Chapter 10 – Packages Chapter 11 – Dynamic typing and expressions Chapter 12 – Runtime type information (RTTI) Chapter 13 – Working with native APIs Chapter 14 – Writing and using dynamic libraries Chapter 15 – Multithreading

Chapter 1 – Language basics

Chapter 2 – Simple types: enumerations, numbers and date/times

Chapter 3 – OOP fundamentals

Chapter 4 – Going further with classes and records

Chapter 5 – String handling

Chapter 6 – Arrays, collections and enumerators

Chapter 7 – Basic I/O: writing console applications and working with the file system

Chapter 8 – Advanced I/O: streams

Chapter 9 – ZIP, XML, Registry and INI file support

Chapter 10 – Packages

Chapter 11 – Dynamic typing and expressions

Chapter 12 – Runtime type information (RTTI)

Chapter 13 – Working with native APIs

Chapter 14 – Writing and using dynamic libraries

Chapter 15 – Multithreading

A reference type that behaves like a value type String indexing Returning length information (Length, ByteLength) Other string types Legacy string types

The Char type Literals and constants Working with Char values: the TCharacter type

Creating repeating strings (StringOfChar, DupeString) Comparing complete strings strictly (=, , CompareXXX and AnsiCompareXXX) Comparing complete strings approximately (ResemblesText, Soundex) Checking whether a string has a certain format or pattern (MatchesMask, TMask) MatchesMask and TMask limitations Checking for sub-strings (StartsXXX, EndsXXX, ContainsXXX) Locating sub-strings (Pos, PosEx, SearchBuf) SearchBuf example Retrieving sub-strings (Copy, AnsiLeftStr, AnsiMidStr, AnsiRightStr) Deleting, inserting and replacing sub-strings (Delete, Insert, StuffString, StringReplace) Trimming whitespace from strings (Trim, TrimLeft, TrimRight) Splitting strings (SplitString) Inserting line breaks (WrapText) Case conversion (LowerCase, UpperCase, AnsiLowerCase, AnsiUpperCase) Reversing strings (ReverseString, AnsiReverseString) String allocation (SetLength) Beyond the freestanding routines

Constructors, properties and methods TStringBuilder method style TStringBuilder vs. naïve string concatenation

TStrings basics: adding, amending, enumerating and deleting items Associating objects Getting and setting items from a single string (CommaText, DelimitedText, Text) TStrings.CommaText TStrings.DelimitedText TStrings.Text Loading and saving text files or streams (LoadFromXXX, SaveToXXX) Name=value indexing TStringList specifics Observing updates

TRegEx Matching methods Elements of a regular expression Unicode: using \p{c} Capturing groups Backreferences Naming captured groups Specifying options Spliting strings Replacing sub-strings Replacing with a callback function

The basic multilingual plane and beyond Decomposed characters Unicode encodings beyond UTF-16 UTF-32/UCS-4 support (UCS4Char, UCS4String, TCharacter) UTF-8 support Detecting valid UTF-8 Elements and characters Byte order marks Converting between character encodings: the TEncoding class Performing conversions and determing input encodings Determining the code page to use

Converting from a string to a PChar Converting from a PChar to a string Dealing with ‘Ansi’ and UTF-8 encoded C-style strings Working with PChar variables PChar indexing

Twitter

Facebook