# TrimString

## Description

Returns a string with all characters in "chars" removed from the ends of the string. The original string is unmodified and a new string is returned with the characters removed. This can be used to remove extra whitespace from the ends of an input string. Note that if you are calling this command from tier 2 then the returned string must be deleted when you are done with it.

## Definition

string TrimString( str, chars )

char* agk::TrimString( const char* str, const char* chars )

## Parameters

- str - The string to modify
- chars - The characters to remove