Snippets

Stefan Glienke Specification pattern draft

Created by Stefan Glienke last modified
var
  stringMatch: Specification<string>;
  s: string;
begin
  stringMatch := TRegExSpecification.Create(...);
  
  // using regular method
  if stringMatch.IsSatisfiedBy(s) then ...

  // using Equal/NotEqual
  if stringMatch = s then ...
  
  // using In
  if s in stringMatch then ...

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.