Special Methods

We've created a few special methods to help simplify your expressions.

These methods are not standard C# functions but we added them to simplify some common use-cases. 

String.OneOf() Method

This string extension method is used to specify one or more values. Ideal replacement for using multiple or (||) conditions.

Evaluate by specifying multiple employee numbers
Employee.EmployeeNumber.OneOf('001234,005678,009876')
 
Evaluate by specifying multiple location codes
Location.LocationCode.OneOf('MIA,LAX,JFK,LGA')
 
 
Evaluate by specifying multiple company codes
Employment.CompanyCode.OneOf("TSLA,MSFT,AMZN,META,AAPL,GOOGL")
  
 

String.NotOneOf() Method

This string extension method is used to specify one or more values to exclude. Ideal replacement for using multiple or (||) conditions.

Evaluate by specifying multiple employee numbers
Employee.EmployeeNumber.NotOneOf('999901,999902,999903')
 
Evaluate by specifying multiple location codes
Location.LocationCode.NotOneOf('TEST,DEMO,EVAL')
 
 
Evaluate by specifying multiple company codes
Employment.CompanyCode.OneOf("ENE,LEHLQ,TWO")
  
 

String.RemoveDiacritics() Method

This string extension method is used to replace diacritical characters with their equivalent non-diacritical characters. 

Replace diacritic characters with non-diacritic characters
Person.FirstName.RemoveDiacritics()
  
  • If the persons first name is Renée, it will be replaced with Renee.
  • If the persons first name is Amélie, it will be replaced with Amelie.
  • If the persons first name is Héloïse, it will be replaced  with Heloise.

 

String.RemoveWhiteSpace() Method

This string extension method is used to remove white-space from a string.  

Remove white-space
Person.LastName.RemoveWhiteSpace()
   
  • If the persons last name is Van Patten, it will be changed to VanPatten.
  • If the persons last name is van der Sar, it will be replaced with vanderSar.
  • If the persons last name is Mc Donald, it will be replaced with McDonald

 

String.RemoveSpecialCharacters() Method

This string extension method is used to remove special characters from a string.  

Remove special characters
Job.Title.RemoveSpecialCharacters()
    
  • If the job title is Sales & Marketing, it will be changed to Sales  Marketing.
  • If the job title is Tech/Support, it will be changed to TechSupport.
  • If the job title is **Finance**, it will be changed to Finance.

 

String.RemoveWhiteSpaceSpecialCharactersDiacritics() Method

This string extension method nests the RemoveWhiteSpace(), RemoveSpecialCharacters() and RemoveDiacritics() methods into a single method for ease of use.  

Remove white-space, special characters and diacritics
Person.LastName.RemoveWhiteSpaceSpecialCharactersDiacritics()
     
  • If the persons last name is van der Woude's, it will be changed to vanderWoudes.
  • If the persons last name is Louis-Marie Lefèvre , it will be changed to LouisMarieLefevre.

 

String.ToTitleCase() Method

This string extension method converts the specified string to title case

Set the string to title case
Person.FirstName.ToTitleCase()
      
  • If the persons first name is JOHN, it will be changed to John.
  • If the persons first name is Louis marie, it will be changed to Louis Marie.

 Next Supported Fields