| ZennoLab.Macros Assembly > ZennoLab.Macros Namespace > TextProcessing Class > Trim Method : Trim(String,String,String) Method |
Type: System.String
The source string.
Type: System.String
The specified characters for trim operation as string object.
Type: System.String
The place where need performs the trim operation. It can have the following values: Begin, End or Full.
public static string Trim( string sourceString, string symbols, string whereToTrim )
Type: System.String
The source string.
Type: System.String
The specified characters for trim operation as string object.
Type: System.String
The place where need performs the trim operation. It can have the following values: Begin, End or Full.
Type: System.String
The string that remains after all specified characters are removed from the start or end of the current string.
// trim specified characters from start and end of string string fullTrim = Macros.TextProcessing.Trim("!string for trim operation?", "!?", "Full"); // trim specified characters from start of string string beginTrim = Macros.TextProcessing.Trim("!string for trim operation?", "!?", "Begin"); // trim specified characters from end of string string endTrim = Macros.TextProcessing.Trim("!string for trim operation?", "!?", "End");
// trim specified characters from start and end of string $fullTrim = Macros::TextProcessing::Trim("!string for trim operation?", "!?", "Full"); // trim specified characters from start of string $beginTrim = Macros::TextProcessing::Trim("!string for trim operation?", "!?", "Begin"); // trim specified characters from end of string $endTrim = Macros::TextProcessing::Trim("!string for trim operation?", "!?", "End");
Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.