| ZennoLab.Macros Assembly > ZennoLab.Macros Namespace > TextProcessing Class > Trim Method : Trim(String,String) Method |
Type: System.String
The source string.
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 whereToTrim )
Type: System.String
The source string.
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 white-space and end line characters from start and end of string string fullTrim = Macros.TextProcessing.Trim(" string for trim operation\r\n ", "Full"); // trim white-space from start of string string beginTrim = Macros.TextProcessing.Trim(" string for trim operation\r\n ", "Begin"); // trim end line characters from end of string string endTrim = Macros.TextProcessing.Trim(" string for trim operation\r\n ", "End");
// trim white-space and end line characters from start and end of string $fullTrim = Macros::TextProcessing::Trim(" string for trim operation\r\n ", "Full"); // trim white-space from start of string $beginTrim = Macros::TextProcessing::Trim(" string for trim operation\r\n ", "Begin"); // trim end line characters from end of string $endTrim = Macros::TextProcessing::Trim(" string for trim operation\r\n ", "End");
Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.