DelphiDigest
65 subscribers
226 photos
13 videos
11 files
1.09K links
Download Telegram
Channel photo updated
@DelphiDigest & @DelphiUzbekistan
In the good old Pascal days, there was a set of functions to handle the I/O (AssignFile, Reset, Rewrite, CloseFile and so on), now we've a bounce of classes. All Delphi streams inherit from TStream and can be used as an internal stream of one of the adapter classes.

There are 10 fundamental types of streams:

System.Classes. TBinaryWriter

: This is a writer for binary data

System.Classes. TStreamWriter

: This is a writer for characters to stream

System.Classes. TStringWriter

: This is a writer for a string

System.Classes. TTextWriter

: This is a writer for sequence of characters; it is an abstract class

System.Classes.TWriter

: This writes component data to an associated stream

System.Classes. TReader

: This reads component data from an associated stream

System.Classes.TStreamReader

: This is a reader for a stream of characters

System.Classes. TStringReader

: This is a reader for a string

System.Classes. TTextReader


: This is a reader for sequence of characters; it is an abstract class

System.Classes. TBinaryReader

: This is a reader for binary data
Learn IP validation regex code in Delphi!

RegEx in Delphi Development :

  if TRegEx.IsMatch(EditIP.Text,
'^[0-9]{1,3}\.{0-9}{1,3}\.{0-9}{1,3}\.{0-9}{1,3}$') then
ShowMessage('IPv4 address is valid.')
else
ShowMessage('IPv4 address is not valid.');
Learn email address validation regex code in Delphi!

  if TRegEx.IsMatch(EditEMailAddress.Text,
'^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$', [roIgnoreCase]) then
ShowMessage('Email address is valid.')
else
ShowMessage('Email address is not valid.');